-> DR> IF SizeX! AND SizeY! > 1 then
-> ^^^^^^^^^^^^^^^^^
->
-> QuickBasic will process the underlined portion as binary first, then
-> see if it's bigger than one.
Actually, no! Boolean operators are always processed *after* equalities
or inequalities, unless brackets are used to force another order. So the
above expression is equivalent to:
IF SizeX! AND (SizeY! > 1) THEN
So the consequence of the IF will be executed if SizeY! is greater than
one, and SizeX! has any non-zero value.
Try it with, say, SizeX! equal to 2 and SizeY! equal to -1. Your
interpretation, ANDing the two Sizes first, would lead to the IF
consequence being executed. (2 AND -1) would come to 2, which is greater
than 1. But in fact the IF consequence will not be executed, since
SizeY! is not greater than 1.
dow
--- PCBoard (R) v15.3 (OS/2) 5
---------------
* Origin: FidoNet: CAP/CANADA Support BBS : 416 287-0234 (1:250/710)
|