[futurebasic] Re: [FB] futurebasic Digest 1 Dec 2011 20:10:04 -0000 Issue 3959

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 2011 : Group Archive : Group : All Groups

From: Robert Purves <listrp@...>
Date: Sat, 3 Dec 2011 15:35:32 +1300
WinGammon@... wrote:

> I have not been reading the list so don't know if this has been addressed or not. I don't have FB 5.6 so can't test it. If it works properly in 5.6, could someone give me a link to it.
> 
> // these 2 tests should give the game answer but don't in FB 5.7
> // in FB 5.5 (and previous verisons) they give the same answer - which is correct.

It's a bug with the not() function. Thanks for the report.

'-------------
include "ConsoleWindow"
print not( _false or _zTrue ) // wrong

print not( (_false or _zTrue) ) // extra parentheses are workaround
'-------------

The workaround is required wherever the argument to not() is an expression with binary operators (+ - * / and or xor).
These are unaffected:
not( x )
not( -x ) // unary operator


Robert P.