-- File: TestControl.adb -- -- Prepared by Prof. Spiegel -- Copyright © 1988-1998 Coronado Enterprises - Last update, February 1, 1998 -- Gordon Dodrill - dodrill@swcp.com -- -- Test the Component package, -- which uses initializers, finalizers, and the adjust procedure, -- See when these components of Ada are called by the system -- with Ada.Text_IO, Component; use Ada.Text_IO, Component; procedure TestControl is Paper : WIDGET; Pencil : WIDGET; begin Put_Line("Beginning this simple program"); Paper.Size := 11; Paper.Number := 25; Put_Line("Paper record filled with data"); Pencil := Paper; Put_Line("Paper copied to Pencil"); Paper := Pencil; Put_Line("Pencil copied to Paper"); end TestControl; -- Result of execution -- -- This is from Initialize -- This is from Initialize -- Beginning this simple program -- Paper record filled with data -- This is from Finalize -- This is from Adjust -- Paper copied to Pencil -- This is from Finalize -- This is from Adjust -- Pencil copied to Paper -- This is from Finalize -- This is from Finalize