OR

OR

PERFORMS A LOGICAL "OR" BETWEEN TWO LOGICAL EXPRESSIONS

  • Type: Operator
  • Parameters: 2
  • Group: Structures

ACTION

The operator OR returns the logical value (true or false) from the logical evaluation between 2 logical expressions :

TRUE when at least one of the 2 logical expressions is TRUE,

FALSE when the 2 expressions are FALSE.

SYNTAX: L1 OR L2

  • L1, L2 : logical expressions.

USE

  • The operator is used in the condition of "IF", "WHILE", "UNTIL".

ERROR

  • If L1 or L2 is not a correct logical expression.
  • If OR is used somewhere else that in an "IF", "WHILE" or "UNTIL" condition.

EXAMPLE

dim a

a=1

if (a=1) or (a=2) then print "a is 1 or 2"

SEE ALSO

IF

THEN

ELSE

END_IF

WHILE

END_WHILE

REPEAT

UNTIL

AND

NOT