-- 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;

use Ada.Text_IO;

package body Animal is
    procedure Animal_Create(Name : in String; Instance : out Animal_Type) is
    
    begin
        Instance.M_Name := Name;
    end Animal_Create;
    
    function Name(A : in Animal_Type) return String is
    
    begin
        return A.M_Name;
    end Name;
    
    procedure Put(A : in Animal_Type'Class) is
    
    begin
        Put(A.M_Name);
        Put(" says ");
        Put(Says(A));
    end Put;
end Animal;
