
A6.8 Expressions 141
Table A6.2 OxGauss operator precedence.
Category operators associativity
primary ident ident() constant ()
postfix []’.’! left to right
power ^.^ left to right
unary +- right to left
multiplicative .*.*.**~/./ left to right
modulo %
additive +- left to right
horizontal concatenation ~
vertical concatenation |
dot relational .$< .$> .$<= .$>= .$>= .$/=
.< .> .<= .>= .== ./= left to right
dot not .not
dot and .and
dot or .or
dot xor .xor
dot eqv .eqv
relational $< $> $<= $>= $>= $/=
< > <= >= == /= left to right
not not
and and
or or
xor xor
eqv eqv
assignment
∗
=
the associativity gives the order of the operators.
Subsections below give a more comprehensivediscussion. Several operators require
an lvalue, which is a region of memory to which an assignment can be made. Many
operators require operands of arithmetic type, that is int, double or matrix.
The most common operators are dot-operators (operating element-by-element) and
relational operators (element by element, but returning a single boolean value). The
resulting value is given Tables A6.3 and A6.4 respectively. In addition, there are special
matrix operations, such as matrix multiplication and division; the result from these
operators is explained below. A scalar consists of: int, double or 1 × 1 matrix.
A6.8.1 Primary expressions
An expression in parenthesis is a primary expression. Its main use is to change the
order of evaluation, or clarify the expression. Other forms of primary expressions are:
an identifier, or an identifier prefixed by the address operator & (the address can only be
Comentários a estes Manuais