The usage of a function call as a parameter for another function call does not work properly. Consider the following function: int increase(int x){ return ++x; } A simple function calls works as expected: b = increase(1) (--> 'b' is assigned the value 2) However the following assignment does not work as expected as it hould assign b the value 3 but it is assigned the value 0. b = increase(increase(1)) This seems to be a known bug but not reported yet.
on trunk I get b==-32767 after "b=increase(increase(1))". it seems that the stack is messed up in a virtual machine.
This bug occurs whenever a function is called twice in the same expression. This affects assignments a = foo(foo(something)) but also return statements in other functions. This also occurs when there are several arguments.
Fixed in rev. 4534 for 4.0 and 4535 in the trunk.