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: ┃ T V

⟦46098abad⟧ TextFile

    Length: 2459 (0x99b)
    Types: TextFile
    Names: »V«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦e24fb53b7⟧ 
            └─⟦this⟧ 

TextFile

with Output_Stream;
package Unconstrained_Array is

    type Types is (Integer, Boolean, Collection, Undefined);

    type Object  is limited private;
    type Objects is array (Natural range <>) of Object;


    Null_Object : constant Object;  
    False, True : constant Object;

    function Value (I : Standard.Integer)  return Object;
    function Value (B : Standard.Boolean)  return Object;
    function Value (The_Objects : Objects) return Object;

    function Get (The_Object : Object) return Standard.Integer;
    function Get (The_Object : Object) return Standard.Boolean;
    function Get (The_Object : Object; The_Position : Natural) return Object;

    procedure Set (The_Object : in out Object; To : Standard.Integer);
    procedure Set (The_Object : in out Object; To : Standard.Boolean);
    procedure Set (The_Object : in out Object; To : Objects);

    function  Undefined_Value                      return Object;
    function  Is_Undefined   (The_Object : Object) return Standard.Boolean;
    procedure Make_Undefined (The_Object : in out Object);

    function Have_Same_Type (Left, Right : Object) return Standard.Boolean;

    procedure Put (The_Object : Object; Where : Output_Stream.Object);

    package Operators is

        function "="  (Left, Right : Object) return Standard.Boolean;
        function "<"  (Left, Right : Object) return Standard.Boolean;
        function "<=" (Left, Right : Object) return Standard.Boolean;
        function ">"  (Left, Right : Object) return Standard.Boolean;
        function ">=" (Left, Right : Object) return Standard.Boolean;

        function "+" (Left, Right : Object) return Object;
        function "-" (Left, Right : Object) return Object;
        function "*" (Left, Right : Object) return Object;
        function "/" (Left, Right : Object) return Object;

        function "-"   (Right : Object) return Object;
        function "abs" (Right : Object) return Object;  
    end Operators;

    Illegal_Operation : exception;
    Typing_Error      : exception;

private

    type Object_Structure (Kind : Types := Integer; Size : Natural := 0);
    type Object is access Object_Structure;

    Null_Object  : constant Object           := null;
    Null_Objects : constant Objects (1 .. 0) := (others => Null_Object);
    False        : constant Object           := Value (Standard.False);
    True         : constant Object           := Value (Standard.True);
end Unconstrained_Array;