Top
Back: 5.2.3 continue
Forward: 5.2.5 export
FastBack: 5. Functions and system variables
FastForward: 6. Tricks and pitfalls
Up: 5.2 Control structures
Top: Singular 2-0-4 Manual
Contents: Table of Contents
Index: F. Index
About: About This Document

5.2.4 else

Syntax:

if ( boolean_expression ) true_block else false_block

Purpose:

executes false_block if the boolean_expression of the if statement is false. This command is only valid in combination with an if command.

Example:
 
int i=3;
if (i > 5)
{
  "i is bigger than 5";
}
else
{
  "i is smaller than 6";
}
→ i is smaller than 6

See Control structures; boolean expressions; if.


Top Back: 5.2.3 continue Forward: 5.2.5 export FastBack: 5. Functions and system variables FastForward: 6. Tricks and pitfalls Up: 5.2 Control structures Top: Singular 2-0-4 Manual Contents: Table of Contents Index: F. Index About: About This Document
            User manual for Singular version 2-0-4, October 2002, generated by texi2html.