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

⟦8e92e2cf6⟧ Ada Source

    Length: 3072 (0xc00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Test_Buff, seg_04ef12

Derivation

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

E3 Source Code



with Buffer;
with Text_Io;  
with Io;
procedure Test_Buff is

    package B is new Buffer (Item => Natural, Taille => 5);

    Buff : B.Object;
    Rep : Character;
    I : Natural;
begin
    B.Create (Buff);
    loop  
        Text_Io.Put_Line ("(a)dd (g)et (f)in ???");
        Text_Io.Get (Rep);  
        case Rep is
            when 'a' =>
                if B.Is_Full (Buff) then
                    Text_Io.Put_Line ("Buffer plein ");
                else  
                    Io.Get (Item => I, Width => 0);
                    B.Add (Buff, I);
                end if;
            when 'g' =>
                if B.Is_Empty (Buff) then
                    Text_Io.Put_Line ("Buffer vide");
                else
                    B.Get (Buff, I);
                    Text_Io.Put_Line ("extraction de => " & Natural'Image (I));
                end if;
            when 'f' =>
                exit;
            when others =>
                null;
        end case;
    end loop;
end Test_Buff;

E3 Meta Data

    nblk1=2
    nid=0
    hdr6=4
        [0x00] rec0=23 rec1=00 rec2=01 rec3=01e
        [0x01] rec0=04 rec1=00 rec2=02 rec3=001
    tail 0x2154a5200877255a70985 0x42a00088462060003