HP Pascal Language Operators
The following table lists the supported HP Pascal operators. Operators
are listed in order of precedence, from highest to lowest. All operators
listed in the same box are of equal precedence. All operators of equal
precedence evaluate left to right, except assignment. Assignment is
treated by the debugger as an operator.
Associativity of operators in the following table is from left to right,
unless otherwise stated.
Any HP C language operators that do not clash with supported HP Pascal
operators can be used in HP Pascal expressions, with the corresponding C
interpretation.
There are two restrictions with the language operators for HP Pascal:
* Variables qualified by the WITH statement in an HP Pascal program
must be fully qualified in HP Symbolic Debugger expressions. The
HP Pascal WITH construct is not recognized as a debugger command.
* The debugger does not support HP Pascal set constants and does not
support operations on sets.
HP Pascal Language Operators
Table D-1. Language Operators for HP Pascal
---------------------------------------------------------------------------------------------
| | |
| Operator | Operation |
| | |
---------------------------------------------------------------------------------------------
| | |
| ( ) | parenthesis, group elements |
| | |
| [ ] | array member selection |
| | |
| . | member selection of record |
| | |
---------------------------------------------------------------------------------------------
| | |
| ^ (order is right to left) | pointer (address) dereferencing |
| | |
| NOT (order is right to left) | unary logical negation |
| | |
| sizeof (order is right to left) | unary size of an object |
| | |
---------------------------------------------------------------------------------------------
| | |
| * | multiplication |
| | |
| / | real division |
| | |
| DIV | integer division with truncation |
| | |
| MOD | modulus |
| | |
---------------------------------------------------------------------------------------------
| | |
| + | addition |
| | |
| - | subtraction |
| | |
---------------------------------------------------------------------------------------------
| | |
| < | relational less than |
| | |
| > | relational greater than |
| | |
| <= | relational less than or equal to |
| | |
| >= | relational greater than or equal to |
| | |
| = | relational equal to |
| | |
| < > | relational not equal to |
| | |
---------------------------------------------------------------------------------------------
| | |
| := (order is right to left) | assignment |
| | |
---------------------------------------------------------------------------------------------
| | |
| AND | logical and |
| | |
---------------------------------------------------------------------------------------------
| | |
| OR | logical or |
| | |
---------------------------------------------------------------------------------------------
| | |
| Special operators: | |
| | |
| $addr | unary address of an object |
| | |
| $sizeof | unary size of an object |
| | |
| $in | unary suspended in named routine |
| | |
---------------------------------------------------------------------------------------------