Choosing between two alternatives depending on a condition is written in Elan as:
If the condition evaluates to true, then the paragraph between THEN and ELSE (the ``then-part'') is executed, and the rest up to the FI skipped. In the contrary case, the then-part is skipped, and the paragraph between ELSE and FI is executed (the ``else-part''). The keyword FI may also be spelled as ENDIF.
This primary form of choice has two variations for common needs. If there is nothing to do in the else-part, then the choice can be simplified by leaving out the else-part:
In case the weather is fine you do nothing (ELSE do nothing was omitted). For decision cascades like
Elan offers another variant of the choice construction:
Also in this case, an empty else-part may be omitted.