-- 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) 
package Fraction is
    type Fraction_Type is private;
    -- constructor
    procedure Fraction_Create(O : in Integer; U : in Integer; Instance : out Fraction_Type);
    -- accessors
    function Over(F : in Fraction_Type) return Integer;
    function Under(F : in Fraction_Type) return Integer;
    -- print
    procedure Put(F : in Fraction_Type);
    -- operators
    function "+"(F1 : in Fraction_Type; F2 : Fraction_Type) return Fraction_Type;
    function "-"(F1 : in Fraction_Type; F2 : Fraction_Type) return Fraction_Type;
    function "*"(F1 : in Fraction_Type; F2 : Fraction_Type) return Fraction_Type;
    function "/"(F1 : in Fraction_Type; F2 : Fraction_Type) return Fraction_Type;
private
    type Fraction_Type is
        record
            M_O : Integer;
            M_U : Integer;
        end record;
end Fraction;
