Precedence

<< Click to Display Table of Contents >>

Navigation:  Explain™ Control Language  > Explain™ fundamentals >

Precedence

Description

As you go down the list of operators, the operators bind more tightly to their arguments. Binding tells the compiler which expressions to evaluate first in a complex statement. Tightly bound operators are evaluated before more loosely bound operators. Practically this means the expressions are evaluated as follows:

 

A + B * C is regarded as A + (B * C)

A eq B or C eq D is regarded as (A eq B) or (C eq D

 

Expressions bind tighter toward the left, e.g.:

 

A / B * C is considered as (A / B) * C

 

You may use parentheses to force other binding, e.g.:

 

(A + B) * C

A / (B * C)

 

If you have programmed in C, Pascal, or Fortran, this should look familiar.

 

Related Topics