[ fromfile: controlstructures.xml id: statements ]
x = y + z;
{ int temp = x; x = y; y = temp; }
The preceding example is a single compound statement that contains three simple statements that are executed in sequence, top to bottom.
The variable temp
is local to the block and is destroyed when the end of the block is reached.
A compound statement may contain other compound statements.
In general, a compound statement can be placed wherever a simple statement can go.
Generated: 2012-03-02 | © 2012 Alan Ezust and Paul Ezust. |