Decidere quale eseguire tra due diverse sequenze di istruzioni
Dopo aver eseguito Istruzione 0 decide se eseguire
- Istruzione 11; Istruzione 12
oppure
- Istruzione 21; Istruzione 22
e poi continua eseguendo Istruzione 3.

In Pascal non c’è il punto e virgola prima dell’else perché il costrutto if…else è considerato un’istruzione unica.
Pseudocodice
SE (E = 1) ALLORA
INIZIO
Istr_11
Istr_12
FINE
ALTRIMENTI
INIZIO
Istr_21
Istr_22
FINE
SE (E = 1) ALLORA
Istr_1
ALTRIMENTI
Istr_2
C, C++, Java, …
if(E == 1)
{
istr_11;
istr_12;
}
else
{
istr21;
istr22;
}
if(E == 1)
istr_1;
else
istr_2;
LibreLogo
IF E == 1 [
ISTR_11
ISTR_12
] [
ISTR_21
ISTR_22
]
IF E == 1 [
ISTR_1
] [
ISTR_2
]
Pascal
If E = 1 Then
Begin
Istr_11;
Istr_12;
End
Else
Begin
Istr_21;
Istr_22;
End;
If E = 1 Then
Istr_1
Else
Istr_2;
Python
if E == 1:
istr_11
istr_12
else:
istr_21
istr_22
if E == 1:
istr_1
else:
istr_2
Small Basic
If E = 1 Then
Istr_11
Istr_12
Else
Istr_21
Istr_22
EndIf
If E = 1 Then
Istr_1
Else
Istr_2
EndIf
Visual Basic
If E = 1 Then
Istr_11
Istr_12
Else
Istr_21
Istr_22
End If
If E = 1 Then
Istr_1
Else
Istr_2
End If