HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)

3- 33
(4*5), where the expressions in parentheses are evaluated first.
Operator Hierarchy
When an expression contains several operators, operator precedence is
used to determine the evaluation order. The operator hierarchy
establishes the precedence relationship among the HP Business BASIC/XL
operators. Expressions with operators of equal precedence are evaluated
from left to right.
Table 3-27 shows the HP Business BASIC/XL operator hierarchy. An
operator takes precedence over those below it in the table. Operators on
the same line of the table have equal precedence.
Table 3-27. Operator Hierarchy
--------------------------------------------------------------------------------------------
| | |
| Operator or Operator Category | Symbol(s) |
| | |
--------------------------------------------------------------------------------------------
| | |
| Subexpressions within Parentheses | () |
| | |
--------------------------------------------------------------------------------------------
| | |
| Exponentiation Operator * | **, ^ |
| | |
--------------------------------------------------------------------------------------------
| | |
| Unary Operators | +, -, NOT |
| | |
--------------------------------------------------------------------------------------------
| | |
| Multiplication and Division Operators | *, MOD, /, DIV |
| | |
--------------------------------------------------------------------------------------------
| | |
| Addition and Subtraction Operators | +, - |
| | |
--------------------------------------------------------------------------------------------
| | |
| Minimum and Maximum Operators | MIN, MAX |
| | |
--------------------------------------------------------------------------------------------
| | |
| Relational Operators | <, <=, =, =>, >, <>, # |
| | |
--------------------------------------------------------------------------------------------
| | |
| Boolean AND Operators | LAND, AND |
| | |
--------------------------------------------------------------------------------------------
| | |
| Boolean OR Operators | LOR, OR, XOR |
| | |
--------------------------------------------------------------------------------------------
Table 3-27 Note
* A unary operator is applied to the exponent before the exponentiation
operator is applied to its arguments. For example, -2**-2 is
equivalent to -(2**(-2)).