DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦2be26be22⟧ TextFile

    Length: 1992 (0x7c8)
    Types: TextFile
    Names: »B«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Text_Io;
package body Behavior is


    None : constant Class := 0;

    Shape : constant Class := 1;

    Circle : constant Class := 2;

    Rectangle : constant Class := 3;

    Square : constant Class := 4;

    Class_Id : Class := 0;

    type Shape_Part is
        record
            Shape : Integer := 1;
        end record;

    type Circle_Part is
        record
            Circle : Integer := 2;
        end record;

    type Rectangle_Part is
        record
            Rectangle : Integer := 3;
        end record;

    type Square_Part is
        record
            Square : Integer := 4;
        end record;

    type Object_Implementation (Kind : Class := 0) is
        record
            case Kind is
                when None =>
                    null;
                when Shape =>
                    S : Shape_Part;
                when Circle =>
                    C : Circle_Part;
                when Rectangle =>
                    R : Rectangle_Part;
                when Square =>
                    Sq : Square_Part;
                when others =>
                    null;
            end case;
        end record;


    procedure Create (B : in out Behavior.Object; C : Class) is
    begin
        B := new Object_Implementation (C);

    end Create;

    procedure Display (B : Behavior.Object) is
    begin
        case B.Kind is
            when None =>
                Text_Io.Put_Line ("*** none ***");
            when Shape =>
                Text_Io.Put_Line ("shape");
            when Circle =>
                Text_Io.Put_Line ("circle");
            when Rectangle =>
                Text_Io.Put_Line ("rectangle");
            when Square =>
                Text_Io.Put_Line ("square");
            when others =>
                raise Non_Existent_Class_Error;
        end case;
    end Display;



    function Register return Class is
    begin  
        Class_Id := Class_Id + 1;
        return Class_Id;
    end Register;
end Behavior;