Contents - Index

Logical Operators


The logical (or comparison) operators that can appear in an IF - THEN  - ELSE or REPEAT - UNTIL statements are:


  <     (less than)

  >     (greater than)

  =     (equal)

  <=   (less than or equal)

  >=   (greater than or equal)

  <> (not equal)

  and  (logical and)

  or     (logical or)


An example of an IF - THEN -ELSE statement using these operators is:


  if (X<Y) and (Y>2) THEN A:=3 else A:=X*Y


The use of parentheses surrounding the logical test is required.


EES will process the logical operations from left to right.  When using more than a single AND or OR, it may be necessary to use parentheses to achieve the desired result. 


Note that IF - THEN - ELSE statements can only be used in Internal functions or procedures.