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

⟦8d8310fac⟧ Ada Source

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

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



package body Conversion is

    function String_To_Bstring (S : String) return Mt.Byte_String is
        Bs : Mt.Byte_String (S'Range);
    begin
        for I in S'First .. S'Last loop
            Bs (I) := Character'Pos (S (I));
        end loop;
        return Bs;
    end String_To_Bstring;


    function Bstring_To_String (Bs : Mt.Byte_String) return String is
        S : String (Bs'Range);
    begin
        for I in Bs'First .. Bs'Last loop
            S (I) := Character'Val (Bs (I));
        end loop;  
        return S;
    end Bstring_To_String;

    function Natural_To_Bstring
                (N : Natural; Taille : Natural) return Mt.Byte_String is
        Bs : Mt.Byte_String (1 .. Taille);
        N2 : Natural;
    begin  
        N2 := N;
        for I in reverse Bs'Range loop
            Bs (I) := N2 mod 100;
            N2 := N2 / 100;
        end loop;
        return Bs;
    end Natural_To_Bstring;

    function Bstring_To_Natural (Bs : Mt.Byte_String) return Natural is
        N : Natural;
    begin
        N := 0;
        for I in Bs'Range loop
            N := N * 100 + Bs (I);
        end loop;
        return N;
    end Bstring_To_Natural;

end Conversion;

E3 Meta Data

    nblk1=2
    nid=0
    hdr6=4
        [0x00] rec0=24 rec1=00 rec2=01 rec3=026
        [0x01] rec0=0b rec1=00 rec2=02 rec3=001
    tail 0x217550dda8763756fc586 0x42a00088462060003