12.1 Expression syntax

An expression applies relational operators to simple expressions. Simple expressions are a series of terms (what a term is, is explained below), joined by adding operators.

_________________________________________________________________________________________________________
Expressions

--        -              -|-------------------------------------
  expression  simple-expression  |-- < --simple-expression -|
                            -<= -|
                            - > -|
                            |>= -|
                            | = -|
                            |<> -|
                            |>< -|
                            |in--|
                            -is--

--simple- expression--|-term ------------------------------------------
                 -|-+ ----
                  |-- --|
                  --or--|
                   xor
___________________________________________________________________

The following are valid expressions:

GraphResult<>grError  
(DoItToday=Yes) and (DoItTomorrow=No);  
Day in Weekend

And here are some simple expressions:

A + B  
-Pi  
ToBe or NotToBe

Terms consist of factors, connected by multiplication operators.

_________________________________________________________________________________________________________
Terms

--term ----factor-------------------------------------------------
        -|- * ---|
         |- / --|
         |-div --|
         |mod --|
         |-and --|
         --shl--|
         --shr--|
           as
___________________________________________________________________

Here are some valid terms:

2 * Pi  
A Div B  
(DoItToday=Yes) and (DoItTomorrow=No);

Factors are all other constructions:

_________________________________________________________________________________________________________
Factors

--factor---(- expression -) ----------------------------------------
         |variable- reference--|
         |--function- call---|
         |unsigned-constant -|
         |--not- factor ---|
         |--sign- factor---|
         --set-constructor---|
         --value-typecast---|
           address- factor

--unsigned- constant--|unsigned- number--------------------------------
                  ---string-literal----|
                  -constant-identifier--|
                        Nil

--variable- reference- fully-qualified- identifier------------------------------
___________________________________________________________________