AND-OR

Syntax:

a# = b# AND c#
a# = b# OR    c#

Binary operators. Mostly used for IF expressions.

AND:

Binary code of b#: 00100010
Binary code of c#: 00100100
Binary code of a#: 00100000
Only bits that are available in b# AND c# will be set in a#.

OR:

Binary code of b#: 00100010
Binary code of c#: 00100100
Binary code of a#: 00100110
All bits that are available in b# OR c# will be set in a#.

Attention:
AND and OR follow the DiNGS operator-style and do evaluate from left to right if no brackets are set.

Sample:

a=1
b=5
IF (a>1) OR (b>1) THEN PRINT “a>5 OR b>5”, 100, 100
a=125000
lobyte=a AND 0x00FF
hibyte=a AND 0xFF00
SHOWSCREEN
MOUSEWAIT