Last modified on 1 June 2009, at 20:42

Template:Computer Programming/Control/1


Conditional clauses are blocks of code that will only execute if a particular expression (the condition) is true.


The if-else statement is the simplest of the conditional statements. They are also called branches, as when the program arrives at an if statement during its execution, control will "branch" off into one of two or more "directions". An if-else statement is generally in the following form: