Canon Cat Reference Manual page 82

Hide thumbs Also See for Cat:
Table of Contents

Advertisement

Order of Computation
When
the Cat
computes
an
expression, it
reads
from
left
to
right, performing
the
operations in
orderof
precedence.
In
other words, it performs
all
the
highest ranking
operations
first, then all the
operations
in
the next lower
rank of
precedence, and
so
on
until
the
entire
expression is
evalu-
ated.
Parentheses
can be used
to
ensure
that
certain
operations
are
performed
first.
For example, (2
+
3)
*
(4 +
5)
ensures
that
the Cat
will
first
add
2
and
3,
then
add
4 and
5,
then
multiply
the
two sums. You
can use up to ten
pairs
of
parentheses
within
parentheses
per expression
you evalu-
ate, though
it's unlikely you'll
ever need that
many.
Precedence
Highest precedence (done
first)
i.
Expressions
inside
parentheses
ii. Adding minus
signs
where needed
(unary
minus)
iii.
Percent
iv. Multiplication
and
division
v. Addition
and
subtraction
vi.
Logical
operations
Lowest
precedence (done last)

Advertisement

Table of Contents
loading

Table of Contents