22 lines
314 B
ObjectPascal
22 lines
314 B
ObjectPascal
program gototest;
|
|
var i:integer;
|
|
label l1,l2;
|
|
begin
|
|
goto l1;
|
|
writeln('skipped');
|
|
l1: writeln('goto destination 1');
|
|
{
|
|
for i := 1 to 10 do
|
|
begin
|
|
goto l2;
|
|
end;
|
|
}
|
|
{
|
|
case i of
|
|
1: writeln('1');
|
|
2: goto l2;
|
|
3..10: writeln('3 - 10');
|
|
end;
|
|
l2: writeln('goto destination 2');
|
|
}
|
|
end.
|