Next: True and false Up: Decisions Previous: Decisions

Statements and blocks

An expression (such as x=0) becomes a statement when it is followed by a semi-colon(x=0;).

Several statements can be turned into a compound statement, or block, by using braces. A compound statement is syntactically equivalent to a single statement; note this means you do not need a final semi-colon after the right brace.



Next: True and false Up: Decisions Previous: Decisions


maspjw@
Tue Sep 27 15:29:34 BST 1994