; Or Example ; ---------- ; Or is true when EITHER side is true (or both) - for Ifs where any ; one condition is enough. On plain integers it also works bitwise, ; which is how option flags get combined. shield=0 potion=1 ; Logical use: one true side is enough If shield Or potion Then Print "You have some protection (shield="+shield+", potion="+potion+")" Else Print "Completely defenceless!" EndIf Print "" ; Bitwise use: a bit set in EITHER value appears in the result a=%1100 b=%1010 Print "a = "+Bin$(a)+" ("+a+")" Print "b = "+Bin$(b)+" ("+b+")" Print "a Or b = "+Bin$(a Or b)+" ("+(a Or b)+")" Print "" ; Combining single-bit flag values into one integer Print "Flags 1, 2 and 8 combined: 1 Or 2 Or 8 = "+(1 Or 2 Or 8) Print "" Print "Press any key to close the example" WaitKey End