5.2 Control structures
A sequence of commands surrounded by curly brackets (
}) is a so-called block. Blocks are used in SINGULAR in
order to define procedures and to collect commands belonging to
while statements and to the
example part in libraries. Even if
the sequence of statements consists of only a single command it has to be
surrounded by curly brackets!
Variables which are defined inside a block
are not local to that block. Note that there need not be an ending semicolon at
the end of the block.
if ( i>j )
// This is the block