If and Then

This is an old revision of If and Then, edited by Djzepi at . The current revision is 33300.

This keyword preciedes a condition, is required to be followed by then and may be followed by else.

<delphi>

 if condition
   then action1
   else action2;

</delphi>

Condition is an expression that evaluates to true or false. Action1 is executed if condition evaluates to true. Action2 is executed if condition evaluates to false.

Keywords: begin — do — else — end — for — if — repeat — then — until — while