On 09/19/13 20:01, Ivan Kazmenko wrote:
> On Thursday, 19 September 2013 at 07:45:44 UTC, monarch_dodra wrote:
>> On Thursday, 19 September 2013 at 06:39:09 UTC, Ivan Kazmenko wrote:
>>> On Thursday, 19 September 2013 at 01:41:15 UTC, mrd wrote:
Why argument "value" in contract isn't equal 2 ?
On Thursday, 19 September 2013 at 07:45:44 UTC, monarch_dodra
wrote:
On Thursday, 19 September 2013 at 06:39:09 UTC, Ivan Kazmenko
wrote:
On Thursday, 19 September 2013 at 01:41:15 UTC, mrd wrote:
Why argument "value" in contract isn't equal 2 ?
Why should it be?
I actually disagree though:
On Thursday, 19 September 2013 at 06:39:09 UTC, Ivan Kazmenko
wrote:
On Thursday, 19 September 2013 at 01:41:15 UTC, mrd wrote:
$ ./bug
body, value=2
out contract, value=0
Why argument "value" in contract isn't equal 2 ?
Why should it be? value is a mutable argument, and the out
contract ev
On Thursday, 19 September 2013 at 06:39:09 UTC, Ivan Kazmenko
wrote:
On Thursday, 19 September 2013 at 01:41:15 UTC, mrd wrote:
$ ./bug
body, value=2
out contract, value=0
Why argument "value" in contract isn't equal 2 ?
Why should it be? value is a mutable argument, and the out
contract ev
On Wednesday, 18 September 2013 at 21:13:27 UTC, mrd wrote:
This bug reproducible also without a template:
http://pastebin.com/QPvCFYL1
$ ./bug
works:
Inside of body: value=1 type=ulong
Inside of out contract: value=1 type=ulong result=[1]
not works:
Inside of body: value=300 type=ulong
Inside
On Thursday, 19 September 2013 at 01:41:15 UTC, mrd wrote:
$ ./bug
body, value=2
out contract, value=0
Why argument "value" in contract isn't equal 2 ?
Why should it be? value is a mutable argument, and the out
contract evaluates it at the return point, which is after it's
set to 0. It is
(new topic because old is mired in a long and clumsy source code)
import std.stdio;
static ubyte func( ulong value )
out( arr )
{
writeln( "out contract, value=", value );
}
body
{
writeln( "body, value=", value );
ubyte res;
value >>= 7;
return res;
}
void main
This bug reproducible also without a template:
http://pastebin.com/QPvCFYL1
$ ./bug
works:
Inside of body: value=1 type=ulong
Inside of out contract: value=1 type=ulong result=[1]
not works:
Inside of body: value=300 type=ulong
Inside of out contract: value=2 type=ulong result=[172, 2]
On Wednesday, 18 September 2013 at 10:59:11 UTC, monarch_dodra
wrote:
On Wednesday, 18 September 2013 at 10:37:29 UTC, mrd wrote:
Is the contract does not uses its own version of arguments?
What is the point of passing earlier changed arguments into
contract block?
That's a good question. I'l
On Wednesday, 18 September 2013 at 10:37:29 UTC, mrd wrote:
Is the contract does not uses its own version of arguments?
What is the point of passing earlier changed arguments into
contract block?
That's a good question. I'll raise it on the main boards.
On Wednesday, 18 September 2013 at 09:56:26 UTC, monarch_dodra
wrote:
On Wednesday, 18 September 2013 at 09:09:29 UTC, mrd wrote:
On Wednesday, 18 September 2013 at 09:07:09 UTC, mrd wrote:
Looks like data corruption. Can't help you much without a
full piece of code that *reproduces* the issue
On Wednesday, 18 September 2013 at 09:09:29 UTC, mrd wrote:
On Wednesday, 18 September 2013 at 09:07:09 UTC, mrd wrote:
Looks like data corruption. Can't help you much without a
full piece of code that *reproduces* the issue (reducing it
helps too).
I will try to do it later. (I tried to cop
On Wednesday, 18 September 2013 at 09:09:29 UTC, mrd wrote:
On Wednesday, 18 September 2013 at 09:07:09 UTC, mrd wrote:
Looks like data corruption.
I can not imagine what corruption was going on here: the fact
that is contract gets the correct value, but the function itself
- not. But they
On Wednesday, 18 September 2013 at 09:07:09 UTC, mrd wrote:
Looks like data corruption. Can't help you much without a full
piece of code that *reproduces* the issue (reducing it helps
too).
I will try to do it later. (I tried to copy these functions in
a separate file - the problem is not re
On Wednesday, 18 September 2013 at 08:25:02 UTC, monarch_dodra
wrote:
On Wednesday, 18 September 2013 at 04:17:41 UTC, mrd wrote:
(question is not about function body realisation - body just
don't receives right argument value)
Looks like data corruption. Can't help you much without a full
pi
On Wednesday, 18 September 2013 at 04:17:41 UTC, mrd wrote:
(question is not about function body realisation - body just
don't receives right argument value)
Looks like data corruption. Can't help you much without a full
piece of code that *reproduces* the issue (reducing it helps too).
For
(question is not about function body realisation - body just
don't receives right argument value)
// Simple function called for unsigned integers:
static
ubyte[] packVarint(T)( T value )
if( isIntegral!T && isUnsigned!T )
out( arr )
{
T d;
size_t size = d.unpackVarint( &arr[0] );
import std.stdio;
import std.conv;
writeln( "out contract, type=", typeid(T), " isUnsigned=",
18 matches
Mail list logo