Go to the first, previous, next, last section, table of contents.


Operator Precedence

In most cases the default precedences of the operators will be correct, however in any case where they are not (such as some mathematical and relational expressions) then bracket pairs can be used to enforce a certain ordering. Pairs of brackets can be used in other circumstances to increase legibility (such as surrounding the condition part of an if .. then or while ... do statement). Some examples are shown below.

%%EQUATE example
  /* default precedence below would
  be a + (b * c) + d */
  (a + b) * (c + d) >> x
  /* brackets add clarity below and also
    affect the conditon which would be
    (not a) and b by default */
  if (not (a and b)) then 1 >> c endif
  /* brackets just add clarity below */
  while ( a > 5 ) do --a >> a wend


Go to the first, previous, next, last section, table of contents.