-- Chapter 13 - Program 7 with Ada.Text_IO, Ada.Integer_Text_IO; use Ada.Text_IO, Ada.Integer_Text_IO; procedure AcessFnc is function Double_It(In_Value : INTEGER) return INTEGER is begin return 2 * In_Value; end Double_It; function Triple_It(In_Value : INTEGER) return INTEGER is begin return 3 * In_Value; end Triple_It; function Decade_It(Number : INTEGER) return INTEGER is begin return 10 * Number; end Decade_It; type ACCESS_FUNCTION is access function(X : INTEGER) return INTEGER; Multiply : ACCESS_FUNCTION; Worker : INTEGER := 17; begin Multiply := Double_It'Access; Put("Double value is"); Put(Multiply(Worker), 6); New_Line; Multiply := Decade_It'Access; Put("Ten times value is"); Put(Multiply(Worker), 6); New_Line; Multiply := Triple_It'Access; Put("Triple value is"); Put(Multiply(Worker), 6); New_Line; end AcessFnc; -- Result of execution -- -- Double value is 34 -- Ten times value is 170 -- Triple value is 51