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

⟦0c9688065⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Player_Error, seg_046e79

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

package body Player_Error is

    package Unlimited_String is new Unbounded_String (10);

    Player_Error_Id : Code;  
    Player_Error_Position : Positive;
    Number_Of_Player_Errors : Natural := 0;

    Tab_Error : array (Code) of Unlimited_String.Variable_String :=
       (Unlimited_String.Value ("est inconnu"),
        Unlimited_String.Value ("Il y a trop de mot dans la commande"),
        Unlimited_String.Value
           ("n'est pas un complement definit dans le vocabulaire"),  
        Unlimited_String.Value
           ("n'est un verbe definit pas dans le vocabulaire"));



    procedure Set_Type_Error (Error_Id : Code; Word_Position : Positive := 1) is
    begin
        Player_Error_Id := Error_Id;
        Player_Error_Position := Word_Position;
        Number_Of_Player_Errors := Number_Of_Player_Errors + 1;
    end Set_Type_Error;


    function Was_Error_Raised return Boolean is
    begin
        return (Number_Of_Player_Errors = 0);
    end Was_Error_Raised;


    procedure Treat is
    begin  
        Text_Io.New_Line;
        Text_Io.Put_Line ("Votre ligne de commande ne peut etre acceptee ");  
        case Player_Error_Id is
            when Bad_Word_Kind =>  
                Text_Io.Put_Line ("Votre mot en position " &
                                  Integer'Image (Player_Error_Position) &
                                  " dans la phrase " &
                                  Unlimited_String.Image
                                     (Tab_Error (Player_Error_Id)));
            when Complement_Expected | Verb_Expected =>
                Text_Io.Put_Line ("Votre mot en position " &
                                  Integer'Image (Player_Error_Position) &
                                  " dans la phrase " &
                                  Unlimited_String.Image
                                     (Tab_Error (Player_Error_Id)));
                Text_Io.Put_Line
                   ("Une syntaxe de commande correct est de la forme suivante :");
                Text_Io.Put_Line ("VERBE [COMPLEMENT1  [COMPLEMENT2]] ");
                Text_Io.New_Line;
            when Too_Many_Words_In_Command =>
                Text_Io.Put_Line (Unlimited_String.Image
                                     (Tab_Error (Player_Error_Id)));
                Text_Io.Put_Line
                   ("Une syntaxe de commande correct est de la forme suivante :");
                Text_Io.Put_Line ("VERBE [COMPLEMENT1  [COMPLEMENT2]] ");
                Text_Io.New_Line;
        end case;
        Text_Io.New_Line;  
    end Treat;


end Player_Error;

E3 Meta Data

    nblk1=4
    nid=2
    hdr6=6
        [0x00] rec0=20 rec1=00 rec2=01 rec3=00e
        [0x01] rec0=15 rec1=00 rec2=04 rec3=018
        [0x02] rec0=11 rec1=00 rec2=03 rec3=000
        [0x03] rec0=03 rec1=95 rec2=95 rec3=242
    tail 0x21543d7448652644343c0 0x42a00088462060003
Free Block Chain:
  0x2: 0000  00 00 00 4e 80 01 3b 01 00 19 20 20 20 20 20 20  ┆   N  ;         ┆