You are on page 1of 5

Structuri de control fundamentale: secventa, str. alternativa, str.

repetitiva
Structuri alternative de decizie
If c1 Then
s1;
[Else
s2;]
End If;
Secventa
var := val
If c
1
Then
s1;
[ElseIf c2 Then
s2;

ElseIf cn Then
s
n ;
]
[Else
s
n+1;
]

End If;
Structuri alternative de selectie
CASE
When <expr>=V1 Then
s1;
When <expr>=V2 Then
s2;

When <expr>=Vn Then
s
n ;

[Else
s
n+1;
]

End Case;
Structuri repetitive
Structura de iteratie conditionata anterior (cu test initial)
While c1
Loop
s1;
End Loop;
Structura de iteratie conditionata posterior (cu test final)
S2;
While c2
Loop
s2;
End Loop;
Structura de iteratie simpla
Loop
S1
EXIT When c2;
s2;
End Loop;
Structura de iteratie cu contor
For I IN VI..VF
Loop
s3;
End Loop;
1
For I IN <multime valori/obiecte>
Loop
s;
End Loop;

You might also like