Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/Repeat/Ada/repeat.ada
Normal file
19
Task/Repeat/Ada/repeat.ada
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
with Ada.Text_IO;
|
||||
|
||||
procedure Repeat_Example is
|
||||
|
||||
procedure Repeat(P: access Procedure; Reps: Natural) is
|
||||
begin
|
||||
for I in 1 .. Reps loop
|
||||
P.all; -- P points to a procedure, and P.all actually calls that procedure
|
||||
end loop;
|
||||
end Repeat;
|
||||
|
||||
procedure Hello is
|
||||
begin
|
||||
Ada.Text_IO.Put("Hello! ");
|
||||
end Hello;
|
||||
|
||||
begin
|
||||
Repeat(Hello'Access, 3); -- Hello'Access points to the procedure Hello
|
||||
end Repeat_Example;
|
||||
Loading…
Add table
Add a link
Reference in a new issue