The If .. then .. else.. prototype syntax is
_________________________________________________________________________________________________________
If then statements
___________________________________________________________________
The expression between the if and then keywords must have a Boolean result type. If the expression evaluates to True then the statement following the then keyword is executed.
If the expression evaluates to False, then the statement following the else keyword is executed, if it is present.
Some points to note:
For example:
Despite its appearance, the statement is syntactically equivalent to
and not to
If it is this latter construct which is needed, the begin and end keywords must be present. When in doubt, it is better to add them.
The following is a valid statement: