Expressions and OperatorsAn Expression is a statement that has a value. For example:
|/||Division (integer division)|
|<=||Less than or equal to|
|<>||Not equal to|
|>=||Greater than or equal to|
The string expressions are evaluated one character at a time from left to right. The comparison of two strings uses the order specified by the ASCII collating sequence. If the strings are of unequal length, the shorter is extended on the right with blanks.
If a < b then...
If i < 10 then...
If a$ = " " then...
If a$ < "Hello" then...
A logicial expression produces a result of type logical. The following table shows the available logical operators:
|OR||Logical inclusive disjunction|
Arithmetic operators are evaluated first, then relational operators, then logical operators.
For arithmetic operators, operator precedence is:
For logicial operators, operator precedence is:
The relational operators have the same level of precedence. They are evaluated from left to right.
You can use parenthesis to force the order of evaluation.