Even though the order of elaboration is dependent on the priority of operators, it is often convenient to change the order. This can be done by inserting parentheses ( and ) (or BEGIN and END): the formula inside the parentheses is evaluated first. Here are two formulæ which differ only by the insertion of parentheses:
3 * 4 - 2 3 *(4 - 2)
The first has the value 10
, and the second 6
.
Parentheses can be nested to any
depth.
REAL a = (3*a3*(xmin+eps1)**2)/4; REAL alpha g=(ymax - ymin)/(xmax - xmin); INT p=BEGIN 2 * 3**4 % (13-2**3) END - 4.0
It is uncommon to find BEGIN
and END
in
short formulæ. If you use BEGIN
at the start of a
formula, you must use END
to complete it even though
these symbols and parentheses are equivalent.