Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
48
Task/Jump-anywhere/Ada/jump-anywhere.ada
Normal file
48
Task/Jump-anywhere/Ada/jump-anywhere.ada
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
procedure Goto_Test is
|
||||
begin
|
||||
|
||||
Stuff;
|
||||
goto The_Mother_Ship; -- You can do this if you really must!
|
||||
Stuff;
|
||||
if condition then
|
||||
Stuff;
|
||||
<<Jail>>
|
||||
Stuff;
|
||||
end if;
|
||||
Stuff;
|
||||
|
||||
-- Ada does not permit any of the following
|
||||
goto Jail;
|
||||
goto The_Sewer;
|
||||
goto The_Morgue;
|
||||
|
||||
Stuff;
|
||||
case condition is
|
||||
when Arm1 =>
|
||||
Stuff;
|
||||
goto The_Gutter; -- Cant do this either
|
||||
Stuff;
|
||||
when Arm2 =>
|
||||
Stuff;
|
||||
<<The_Gutter>>
|
||||
Stuff;
|
||||
<<The_Sewer>>
|
||||
Stuff;
|
||||
end case;
|
||||
|
||||
Stuff;
|
||||
for I in Something'Range loop
|
||||
Stuff;
|
||||
<<The_Morgue>>
|
||||
if You_Are_In_Trouble then
|
||||
goto The_Mother_Ship;
|
||||
-- This is the usual use of a goto.
|
||||
end if;
|
||||
Stuff;
|
||||
end loop;
|
||||
|
||||
Stuff;
|
||||
<<The_Mother_Ship>>
|
||||
Stuff;
|
||||
|
||||
end Goto_Test;
|
||||
Loading…
Add table
Add a link
Reference in a new issue