-- Chapter 13 - Program 2 with Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO; use Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO; procedure Access2 is type POINT_TO_INT is access INTEGER; Index, Arrow : POINT_TO_INT; type POINT_TO_FLOAT is access FLOAT; X, Y, Z : POINT_TO_FLOAT; begin Index := new INTEGER'(173); Arrow := new INTEGER'(57); Put("The values are"); Put(Index.all, 6); Put(Arrow.all, 6); New_Line; Index.all := 13; Arrow.all := Index.all; Index := Arrow; X := new FLOAT'(3.14159); Y := X; Z := X; Put("The float values are"); Put(X.all, 6, 6, 0); Put(Y.all, 6, 6, 0); Put(Z.all, 6, 6, 0); New_Line; X.all := 2.0 * Y.all; Put("The float values are"); Put(X.all, 6, 6, 0); Put(Y.all, 6, 6, 0); Put(Z.all, 6, 6, 0); New_Line; end Access2; -- Result of execution -- The values are 173 57 -- The float values are 3.141590 3.141590 3.141590 -- The float values are 6.283180 6.283180 6.283180