pTAL Reference Manual (H06.08+)
Expressions
HP pTAL Reference Manual—523746-006
5-3
Operator Precedence
Operator Precedence
Operators in expressions can be arithmetic (signed, unsigned, or logical) or conditional
(relational, signed or unsigned). Within an expression, the compiler evaluates the
operators in the order of precedence. Within each level of precedence, the compiler
evaluates the operators from left to right.
Table 5-1. Precedence of Operators (page 1 of 2)
Operator Operation Precedence
<< Signed left bit shift 0 (highest)
>> Signed right bit shift
'<<' Unsigned left bit shift
'>>' Unsigned right bit shift
[n ] Indexing 1
@ Address of identifier
+ Unary plus
- Unary minus
<...> Bit extraction 2
* Signed multiplication 3
/ Signed division
'*' Unsigned multiplication
'/' Unsigned division
'\' Unsigned remainder
+ Signed addition 4
- Signed subtraction
'+' Unsigned addition
'-' Unsigned subtraction
LOR Bitwise logical OR
LAND Bitwise logical AND
XOR Bitwise exclusive OR










