Next: while statements
Up: Applying the simplify algorithm
Previous: Interfaces.
Contents
Index
if, switch, and synchronized statements
Consider the statement
where
is an expression and
is a statement.
As usual,
and
are the results of applying
the simplify algorithm to
. If
, i.e. no
simplification is required, the transformed version is just
where
is the pre-translated version of
.
Otherwise the transformed version is
The if-else, switch and synchronized statements
follow exactly the same pattern.
Bryan Carpenter
2003-04-15