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);
Seealso:
This page last updated on Fri Nov 30 10:48:32 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster