Logical operators – Turning Technologies ExamView User Manual
Page 104
ExamView Test Generator
104
Logical Operators
ExamView Test Generator provides you with numerous pre-defined logical operators to use when defining variables,
conditions, and user-defined functions.
AND
expression AND expression
Returns TRUE (1) only if both expressions evaluate to non-zero, otherwise returns
FALSE (0). If the first expression evaluates to FALSE, the second expression is not
evaluated.
EQV
expression EQV expression
Returns TRUE (1) if both expressions evaluate to non-zero or if both expressions
evaluate to zero, otherwise returns FALSE (0).
IMP
expression IMP expression
Returns TRUE (1) if the first expression evaluates to non-zero and the second expression
evaluates to zero, otherwise returns FALSE (0).
MOD
expression MOD expression
Divides the first expression by the second expression and returns the remainder. If the
second expression is equal to zero, the function will return zero. Integer division may
return a negative value to satisfy the identity: (-A)/B = -(A/B) = A/(-B)
EXAMPLE
-34 MOD 6 will return -4
NOT
NOT expression
If expression evaluates to non-zero, this will return FALSE (0), otherwise it will return
TRUE (1).
OR
expression OR expression
Returns TRUE (1) if either expression evaluates to non-zero, otherwise returns FALSE
(0). If the first expression evaluates to TRUE, the second expression is not evaluated.
XOR
expression XOR expression
Returns the bitwise exclusive-OR or the two expressions.
turningtechnologies.com/user-guides