Issue information

Issue ID
#6910
Status
Confirmed
Severity
Medium
Started
Hercules Elf Bot
Nov 17, 2012 4:55
Last Post
Hercules Elf Bot
Nov 17, 2012 6:02
Confirmation
Yes (1)
No (0)

Hercules Elf Bot - Nov 17, 2012 4:55

Originally posted by [b]Ind[/b]
[code]
[02:52:09] <lighta> set .@ret,.@ret+func() != .@ret += func();
[02:52:22] <lighta> cause he doesn't evaluate the func before assigning
[02:52:39] <lighta> set .@succes,.@succes+ChkResult(.@testid++,1,.@ret); //assignement ok
[/code]

This post has been edited by Ind on Nov 17, 2012 4:55

Hercules Elf Bot - Nov 17, 2012 6:02

Originally posted by [b]Lighta[/b]
test case :
.@tmp = 1;
set .@tmp,.@tmp+Add(1,3);
debugmes "Test 1 "+(.@tmp==5)?"Success":"Failure";
.@tmp = 1;
.@tmp += Add(1,3);
debugmes "Test 2 "+(.@tmp==5)?"Success":"Failure";

function Add {
.@sum = getarg(0)+getarg(1);
return .@sum;
}

==> test2 failure