RosettaCodeData/Task/Higher-order-functions/Ada/higher-order-functions-1.ada
2023-07-01 13:44:08 -04:00

17 lines
338 B
Ada

with Ada.Text_Io; use Ada.Text_Io;
procedure Subprogram_As_Argument is
type Proc_Access is access procedure;
procedure Second is
begin
Put_Line("Second Procedure");
end Second;
procedure First(Proc : Proc_Access) is
begin
Proc.all;
end First;
begin
First(Second'Access);
end Subprogram_As_Argument;