IF Boolean_Logic = Inconsistent Then IsBug()

BlitzMax Forums/BlitzMax Programming/IF Boolean_Logic = Inconsistent Then IsBug()

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

If 10 = True 
	Print "(10 = True) = True!"
Else
	Print "(10 = True) = False!"
EndIf
	
If 10 
	Print "10 = True!"
Else
	Print "10 = False!"
EndIf



Both of these should return the same result. Presumably, the second result, because in just about every language out there, 0 = False and anything else = True. But they do not!

Doing something like If (Flags&BIT_CONSTANT = True) results in nothing happening because of this, but If Flags&BIT_CONSTANT will trigger correctly!

And no, this is not due to order of operations unless those are screwed, because If (Flags&BIT_CONSTANT <> 0) does work. So it is not doing this: If Flags&(BIT_CONSTANT = True)