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

⟦559e0d272⟧ Ada Source

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

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 Screen, Text_Io, Unbounded_String;

package body Lex_Jo is

    package Ubs is new Unbounded_String;

    subtype Digit is Character range '0' .. '9';
    subtype Lowercase is Character range 'a' .. 'z';
    subtype Uppercase is Character range 'A' .. 'Z';

    Une_Chaine : String (1 .. 80);
    Nb_Car_Lu, Cpt, Nb_Mot : Natural;
    Error : Boolean := False;
    Nouveau_Mot : Boolean := True;
    Tab_Mot : array (1 .. 4) of Ubs.Variable_String;

    procedure Saisirtexte is

    begin
        Get_Line (Une_Chaine, Nb_Car_Lu);
        New_Line;
        Cpt := 1;
        Nb_Mot := 0;
        while (Cpt <= Nb_Car_Lu) and not Error loop
            case Une_Chaine (Cpt) is
                when Digit | Lowercase | Uppercase =>
                    if not Nouveau_Mot then
                        Ubs.Append (Tab_Mot (Nb_Mot), Une_Chaine (Cpt));
                        Cpt := Cpt + 1;
                    else
                        if Nb_Mot < 4 then
                            Nb_Mot := Nb_Mot + 1;
                            Ubs.Free (Tab_Mot (Nb_Mot));
                            Nouveau_Mot := False;
                        else
                            Error := True;
                        end if;
                    end if;
                when ' ' =>
                    while Une_Chaine (Cpt) = ' ' loop
                        Cpt := Cpt + 1;
                    end loop;
                    Nouveau_Mot := True;
                when others =>
                    Error := True;
            end case;
        end loop;

        if not Error then
            for I in Tab_Mot'Range loop
                Put_Line (Ubs.Image (Tab_Mot (I)));
            end loop;
        else
            Put_Line ("il y a eu une erreur detecte dans la phrase !!");
        end if;
    end Saisirtexte;




end Lex_Jo;

E3 Meta Data

    nblk1=2
    nid=0
    hdr6=4
        [0x00] rec0=20 rec1=00 rec2=01 rec3=046
        [0x01] rec0=1f rec1=00 rec2=02 rec3=001
    tail 0x21537ca5a86045dfd8b65 0x42a00088462060003