List of expression elements / Comparison operators |
The == operator checks for equality of two expressions or for two record variables.
expr == expr
record1.* == record2.*
The == operator evaluates whether two expressions or two records are identical.
A single equal sign (=) can be used as an alias for the == operator.
When comparing expressions using the first syntax, the result of the operator is FALSE when one of the operands is NULL. This first syntax applies to most data types, except complex types like BYTE and TEXT.
When comparing two records using the second syntax, the runtime system compares all corresponding members of the records. If a pair of members are different, the result of the operator is FALSE. When two corresponding members are NULL, they are considered as equal. This second syntax allows you to compare all members of records, but records must have the same structure.
MAIN DEFINE n INTEGER LET n=512 IF n==512 THEN DISPLAY "The variable equals 512." END IF END MAIN