AND

AND

PERFORMS A LOGICAL "AND" BETWEEN TWO LOGICAL EXPRESSIONS

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

ACTION

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

TRUE when the 2 expressions are TRUE,

FALSE when at least one of the 2 logical expressions is FALSE.

SYNTAX: L1 AND L2

  • L1, L2 : logical expressions.

USE

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

ERROR

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

EXAMPLE

dim a, b

a=1:b=2

if (a=1) and (b=2) then print "a is 1 and b is 2"

SEE ALSO

IF

THEN

ELSE

END_IF

WHILE

END_WHILE

REPEAT

UNTIL

OR

NOT