Dopo aver eseguito istruzione 0 decide se eseguire
Istruzione 11
Istruzione 12
…
e poi continua eseguendo istruzione 2.
Codifiche
Più istruzioni
Una sola istruzione
1
2
3
4
5
6
7
...
SE (E = 1) ALLORA
INIZIO
Istr_11
Istr_12
FINE
...
1
2
3
4
...
SE (E = 1) ALLORA
Istr_1
...
C…
1
2
3
4
5
6
7
...
if(E == 1)
{
istr_11;
istr_12;
}
...
1
2
3
4
...
if(E == 1)
istr_1;
...
1
2
3
...
if(E == 1) istr_1;
...
LibreLogo
1
2
3
4
5
6
...
IF E == 1 [
ISTR_11
ISTR_12
]
...
1
2
3
4
5
...
IF E == 1 [
ISTR_1
]
...
1
2
3
...
IF E == 1 [ ISTR_1 ]
...
Pascal
1
2
3
4
5
6
7
...
If E = 1 Then
Begin
Istr_11;
Istr_12;
End;
...
1
2
3
4
...
If E = 1 Then
Istr_1;
...
1
2
3
...
If E = 1 Then Istr_1;
...
Python
1
2
3
4
5
...
if E == 1:
istr_11
istr_12
...
1
2
3
4
...
if E == 1:
istr_1
...
1
2
3
...
if E == 1: istr_1
...
SMALL BASIC
1
2
3
4
5
6
...
If E = 1 Then
Istr_1
Istr_2
EndIf
...
1
2
3
4
5
...
If E = 1 Then
Istr_1
EndIf
...
VISUAL BASIC
1
2
3
4
5
6
...
If E = 1 Then
Istr_1
Istr_2
End If
...
1
2
3
4
5
...
If E = 1 Then
Istr_1
End If
...
1
2
3
...
If E = 1 Then Istr_1
...
Se viene controllata l’esecuzione di singole istruzioni si può semplificare la scrittura. In Basic è possibile eliminare anche l’etichetta End If se si scrive l’unica istruzione controllata sulla stessa riga dell’If…