[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
if if Statement
if (expression)
statement1;
[else
statement2;]
Notes: The parentheses are required around expression.
Statement1 is executed when expression is TRUE (non
zero).
-------------------------------- Example ---------------------------------
if (i < 4)
process(SMALL);
if (i < 4)
process(SMALL);
else if (i < 10)
process(MEDIUM);
An `else' always belongs to the most recent `if', so the second
`else' in this next example--else process(LARGE)--belongs to:
if (i < 10).
if (i < 4)
process(SMALL);
else if (i < 10)
process(MEDIUM);
else
process(LARGE);
See Also:
else
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson