DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦d6c078406⟧ Ada Source

    Length: 3072 (0xc00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Site, seg_04d94c

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦this⟧ 

E3 Source Code



with Util_String;

package body Site is

    package Us renames Util_String;

    Debut_Site : constant String := "Debut Site";
    Fin_Site : constant String := "Fin Site";
    Sep_Site : constant Character := '#';

    function Image (O : Object) return String is
    begin
        return (Debut_Site & Natural'Image (O) & Sep_Site & Fin_Site);
    end Image;


    function Value (S : String) return Object is
        O : Object;
        Der_Car : Natural;
    begin
        Value (S, O, Der_Car);
        return O;
    end Value;


    procedure Value (S : String; O : in out Object; Der_Car : in out Natural) is
        P1, P2, P3 : Natural;
    begin

        Us.String_Contient (S, Debut_Site, P1);
        Us.Position (S (P1 .. S'Last), Sep_Site, P2);
        Us.String_Contient (S (P2 + 1 .. S'Last), Fin_Site, P3);

        -- recherche de Debut_Site au debut de S
        -- Recherche la premiere occurence de sep_site a la suite de DeBut_Site
        -- Recherche de Fin_site apres Sep_site

        O := Natural'Value (S (P1 + 1 .. P2 - 1));
        Der_Car := P3;

    exception
        when Us.Template_Non_Trouve =>
            raise Code_Site_Error;
    end Value;


    procedure Create (O : in out Object; N : Natural) is
    begin
        if N not in 0 .. Max_Code_Site then
            raise Code_Site_Error;
        end if;
        O := N;
    end Create;


    function Get_Id (O : Object) return Natural is
    begin
        return O;
    end Get_Id;

end Site;

E3 Meta Data

    nblk1=2
    nid=0
    hdr6=4
        [0x00] rec0=24 rec1=00 rec2=01 rec3=08e
        [0x01] rec0=1b rec1=00 rec2=02 rec3=001
    tail 0x2175523dc876459b7f1c2 0x42a00088462060003