case case if
case if
Pascal
{ selection in an if statement }
if a = 0 then
{ do something }
else
do something else
selection in a case statement
case Shape of
Square DrawSquare;
Circle DrawCircle;
Pentagon DrawPentagon
DoubleHelix: DrawDoubleHelix
end
loop
basic FOR NEXT Fortran Do Pascal C while for
goto Ada
Ada
example of iteration using a for loop
for INDEX in FIRST..LAST loop
DO_SOMETHING INDEX
end loop
--example of iteration using a while loop
INDEX = FIRST;
while INDEX = LAST loop
DO_SOMETHING INDEX ;
INDEX := INDEX l
End loop;
example of iteration using a loop-with exit loop