Short-circuit evaluation & variable initialization
Status: Alpha
Brought to you by:
afrow_uk
The assembler does not throw an error if you put an assignment on the right hand side of an || or && operator.
Example:
$var1 = 9;
if ($var1 == 9 || ($var2 = 5) > 99)
DetailPrint($var2);
The assignment to $var2 may never occur (in this case it will never occur) and yet the assembler will not complain. If $var2 was assigned a value elsewhere prior to this code being executed, then it would still have that value instead of 5.
Stu