-- Collection of code snippets by Arne Vajhøj -- (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) with Ada.Text_IO,Animal,Dog,Cat; use Ada.Text_IO,Animal,Dog,Cat; procedure Test_Animal is type Animal_Access is access all Animal_Type'Class; My_Dog : aliased Dog_Type; My_Cat : aliased Cat_type; My_Animals : array (1..2) of Animal_Access; begin Dog_Create(My_Dog); Cat_Create(My_Cat); My_Animals(1) := My_Dog'Access; My_Animals(2) := My_Cat'Access; for I in 1..2 loop Put(My_Animals(I).all); New_line; end loop; end Test_Animal;