Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/Loops-Continue/Ada/loops-continue-1.ada
Normal file
15
Task/Loops-Continue/Ada/loops-continue-1.ada
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
with Ada.Text_IO;
|
||||
use Ada.Text_IO;
|
||||
|
||||
procedure Loop_Continue is
|
||||
begin
|
||||
for I in 1..10 loop
|
||||
Put (Integer'Image(I));
|
||||
if I = 5 or I = 10 then
|
||||
New_Line;
|
||||
goto Continue;
|
||||
end if;
|
||||
Put (",");
|
||||
<<Continue>> --Ada 2012 no longer requires a statement after the label
|
||||
end loop;
|
||||
end Loop_Continue;
|
||||
18
Task/Loops-Continue/Ada/loops-continue-2.ada
Normal file
18
Task/Loops-Continue/Ada/loops-continue-2.ada
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
with Ada.Text_IO;
|
||||
use Ada.Text_IO;
|
||||
|
||||
procedure Loop_Continue is
|
||||
begin
|
||||
Print_All:
|
||||
for I in 1 .. 10 loop
|
||||
Print_Element: loop
|
||||
Put (Integer'Image(I));
|
||||
if I = 5 or I = 10 then
|
||||
New_Line;
|
||||
exit Print_Element;
|
||||
end if;
|
||||
Put (",");
|
||||
exit Print_Element;
|
||||
end loop Print_Element;
|
||||
end loop Print_All;
|
||||
end Loop_Continue;
|
||||
Loading…
Add table
Add a link
Reference in a new issue