HP C/iX Reference Manual (31506-90011)
66 Chapter5
Expressions
Unary Operators
Unary Operators
You form unary expressions by combining a unary operator with a single operand. All
unary operators are of equal precedence and group from right to left.
Syntax
unary-expression
:=
postfix-expression
unary-expression
unary-expression
unary-operator cast-expression
sizeof
unary-expression
sizeof (
type-name
)
unary-operator
:= one selected from
*-~!+
Examples
The unary plus operator
: +var
The unary minus operator
: -var
The address-of operator
: &var
The indirect operator
: *ptr
The logical NOT operator
: !var
The bitwise NOT operator
: ~var