If the statement is a simple IF statement, such as:
IF ( x )
then ATEasy returns a logical (boolean) result.
If the operator is one of the following:
and, not, or , xor,
then ATEasy expects either a logical operand or a bitwise operation.
If the operands are all numeric, ATEasy will perform the operation in bitwise mode. For example:
IF (nShort and lLong)
If both operands are objects and the operator is equals (=), then ATEasy checks to see if they reference the same objects and returns a boolean result. For example:
If (obX1 = obX2) ! Result is boolean
If both operands are procedures and the operator is equals (=), then ATEasy checks to see if they reference the same procedures and returns a boolean result.
If (Proc1 = Proc2) ! Result is boolean
If one of the operands is either a Boolean, procedure, or object, the operand is first converted to a Boolean and ATEasy performs a logical operation with a Boolean result. If the operand is a procedure or an object, it becomes False if the procedure or object has not been set; or it becomes True if it points to a valid procedure or object that is not empty. For example, ATEasy evaluates the following statement to mean the programmer is looking to see if both objects exit:
IF (obA and obB)
If one of the operands is a Variant, ATEasy encounters a Variant, it assumes that the result is a bitwise operation and starts evaluating the result in bitwise mode. For example:
vOne=0x05 ! vOne is declared as Variant, bit value 0000 0101
vTwo=0x10 ! vTwo is declared as Variant, bit value 0001 0000
bA=vOne ! bA is declared as Boolean
bB=vTwo ! bB is declared as Boolean
IF (bA and bB) ! is evaluated to True.
If (vOne and vTwo) ! is evaluated to False.