April 1998
Intermediate to advanced
624 pages
16h 11m
English
Some of the control structures have already been covered. This section discusses all of the control structures in detail.
All control statements in SymbEL must have a block associated with them. The block begins with a left curly brace, {, and ends with a right curly brace, }. This convention keeps the grammar clean and provides additional code clarity.
The if statement can be an if by itself or an if statement and an else part. The structure of an if construct is:
if (logical expression){
...
}Two points need to be made about this construct.
The first point is that the condition if checks on cannot be an expression—it must be a logical expression. Therefore, statements such as
if (running) { ... ...