Statements
Simple Statements
A simple statement is an
expression
followed by a
;
(semicolon)
The simplest statement of all is the empty statement, which looks like:
;
A line like
a = b;;
actually contains two statements, an assignment and an empty statement
Compound statements
A compound statement starts with
{
, ends with
}
and contains zero or more statements (either simple
or
compound)
The simplest compound statement is:
{ }
As stated above, a compound statement can include compound statements
{ a_func() { subfunc() } b_func() }
Statements have no return value
cannot do something like
a = (b = 3;);
there is no reason to do this
Previous
,
Next
,
Index