My favourite style of check is this;
`Setup Constants
#Constant Check_1 1
`Setup some Variables
Something_To_Check as Dword
`Assign a value to your variables
Something_To_Check = 1
`Now check!
IF (Something_To_Check && Check_1)
Print "Check 1 True"
Else
Print "Check 1 False"
ENDIF
wait key
end
Anyone know what this technique is called? Is it a "Bitwise" check?
Oh, almost forgot, expanding on my above example;
`Setup Constants
#Constant Check_1 1
#Constant Check_2 2
#Constant Check_3 4
#Constant Check_4 8
`Setup some Variables
Something_To_Check as Dword
`Assign a value to your variables
Something_To_Check = 3
`Now check!
IF (Something_To_Check && Check_1)
Print "Check 1 True"
Else
Print "Check 1 False"
ENDIF
IF (Something_To_Check && Check_2)
Print "Check 2 True"
Else
Print "Check 2 False"
ENDIF
IF (Something_To_Check && Check_3)
Print "Check 3 True"
Else
Print "Check 3 False"
ENDIF
IF (Something_To_Check && Check_4)
Print "Check 4 True"
Else
Print "Check 4 False"
Endif
wait key
end