Syntax
if condition then statement
else if condition then statement
else if condition then statement
...
else statement
The term if-then-else denotes a selection statement created by John McCarthy (author of Lisp) that was included in the Revised Report on the Algorithmic Language Algol 60. The initial if statement notation was improved upon by later languages. Explicit termination is now often required as in the case of the END keyword in Modula-2. Selection semantics are also disambiguated by elsif forms featured by a large collection of popular contemporary languages including Perl.
This version of Algol allowed if-then-else statements to be nested in an expression. C uses the less orthogonal tertiary operator represented by ?: for embedded conditionals.
Syntax
while condition do statement
Wirth's innovation of logically-controlled looping constructs is of particular significance. This loop writing style is emulated by a myriad of imperative programming languages.