next up previous contents index search.gif
Next: 6.2 Function calls Up: 6. Expressions Previous: 6. Expressions

6.1 Expression syntax

An expression applies relational operators to simple expressions. Simple expressions are a series of terms, joined by adding operators.

Expressions

\begin{syntdiag}\setlength {\sdmidskip}{.5em}\sffamily\sloppy \synt{expression}
...
... + \\
\verb+ is +
\)\synt{simple\ expression}
\end{displaymath}\end{syntdiag}

\begin{syntdiag}\setlength {\sdmidskip}{.5em}\sffamily\sloppy \synt{simple\ expr...
...\\
\(
\lit* + \\
\lit* - \\
\lit*{or} \\
\lit*{xor}
\)\>\end{syntdiag}
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 Not ToBe
Terms consist of factors, connected by multiplication operators.

Terms

\begin{syntdiag}\setlength {\sdmidskip}{.5em}\sffamily\sloppy \synt{term}
\<[b] ...
...} \\
\lit*{and} \\
\lit*{shl} \\
\lit*{shr} \\
\lit*{as}
\)\>\end{syntdiag}
Here are some valid terms:

2 * Pi
A Div B
(DoItToday=Yes) and (DoItTomorrow=No);
Factors are all other constructions:

Factors

\begin{syntdiag}\setlength {\sdmidskip}{.5em}\sffamily\sloppy \synt{factor}
\( \...
...onstructor}\\
\synt{value\ typecast}\\
\synt{address\ factor}
\)\end{syntdiag}

\begin{syntdiag}\setlength {\sdmidskip}{.5em}\sffamily\sloppy \synt{unsigned\ co...
...acter\ string} \\
\synt{constant\ identifier} \\
\lit*{Nil}
\)\end{syntdiag}


root
1999-06-10