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

⟦facc60f48⟧ Ada Source

    Length: 6144 (0x1800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Test_Room, seg_0488ea

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

procedure Test_Room is

    Ok : Boolean;

begin
    Rooms.Create ("Cuisine");
    Rooms.Create ("Salle_de_bain");
    Rooms.Create ("Bureau");
    Rooms.Create ("Cave");
    Rooms.Create ("Chambre");
    Rooms.Create ("Espace");

    Rooms.Set_Comment ("Cuisine", "petite cuisine integree");
    Rooms.Set_Comment ("Salle_de_bain", "Salle de bain rose");
    Rooms.Set_Comment ("Espace", "Espace interstellaire");
    Rooms.Set_Comment ("Chambre", "Chambre avec un grand lit");

    Rooms.Add_State ("Cuisine", "eclairee");
    Rooms.Add_State ("Cuisine", "encombree");
    Rooms.Add_State ("Cuisine", "enfumee");
    Rooms.Add_State ("Cuisine", "chaude");
    Rooms.Add_State ("Cave", "sombre");
    Rooms.Add_State ("Espace", "infini");
    Rooms.Add_State ("Espace", "etoile");

    Rooms.Add_Communication ("Cuisine", "porte_sud", "Cave");
    Rooms.Add_Communication ("Cuisine", "passage", "Bureau");
    Rooms.Add_Communication ("Cuisine", "porte_bleue", "Chambre");
    Rooms.Add_Communication ("Cuisine", "trappe", "Cellier");

    Rooms.Set_Communication_Mode ("Cuisine", "porte_sud", Rooms.Unlock);
    Rooms.Set_Communication_Mode ("Cuisine", "passage", Rooms.Lock);
    Rooms.Set_Communication_Mode ("Cuisine", "trappe", Rooms.Lock);
    Rooms.Set_Communication_Mode ("Cuisine", "porte_bleue", Rooms.Unlock);

    Rooms.Set_Communication_Visibility ("Cuisine", "porte_sud", Rooms.Visible);
    Rooms.Set_Communication_Visibility ("Cuisine", "passage", Rooms.Visible);
    Rooms.Set_Communication_Visibility ("Cuisine", "trappe", Rooms.Unvisible);
    Rooms.Set_Communication_Visibility
       ("Cuisine", "porte_bleue", Rooms.Visible);

    Rooms.Set_Communication_Comment
       ("Cuisine", "porte_sud", "porte vers la cave");
    Rooms.Set_Communication_Comment ("Cuisine", "passage", "Passage sombre");
    Rooms.Set_Communication_Comment
       ("Cuisine", "trappe", "trappe avec un gros anneau");
    Rooms.Set_Communication_Comment
       ("Cuisine", "porte_bleue", "jolie porte bleue");

    Text_Io.Put_Line ("commentaire de la cuisine       : " &
                      Rooms.Get_Comment ("cuisine"));
    Text_Io.Put_Line ("commentaire du bureau           : " &
                      Rooms.Get_Comment ("bureau"));
    Text_Io.Put_Line ("commentaire de l'espace         : " &
                      Rooms.Get_Comment ("espace"));
    Text_Io.Put_Line ("commentaire de la salle de bain : " &
                      Rooms.Get_Comment ("salle_de_bain"));
    Text_Io.New_Line;


    if Rooms.In_State ("Cuisine", "enfumee") then
        Text_Io.Put_Line ("la cuisine est enfumee");
    end if;
    if not Rooms.In_State ("Cave", "enfumee") then
        Text_Io.Put_Line ("la cave n'est pas enfumee");
    end if;
    if Rooms.In_State ("Espace", "infini") then
        Text_Io.Put_Line ("L'espace est infini");
    end if;
    if not Rooms.In_State ("Chambre", "") then
        Text_Io.Put_Line ("la chambre n'a pas d'etat");
    end if;

    Text_Io.New_Line;

    Rooms.Set_Current_Room ("cuisine");
    Rooms.Go_First_State;
    while not Rooms.At_End_State loop
        Text_Io.Put_Line (Rooms.Get_Current_State);
        Rooms.Go_Next_State;
    end loop;
    Rooms.First_Communication;
    while not Rooms.At_End_Communication loop
        Text_Io.Put_Line ("        piece courante : " & Rooms.Get_Current_Room);
        Text_Io.Put_Line ("            way : " & Rooms.Get_Communication_Way);
        Text_Io.Put_Line ("    destination : " &
                          Rooms.Get_Communication_Destination);
        case Rooms.Get_Communication_Mode is
            when Rooms.Lock =>
                Text_Io.Put_Line ("           mode : lock");
            when Rooms.Unlock =>
                Text_Io.Put_Line ("           mode : unlock");
        end case;
        case Rooms.Get_Communication_Visibility is
            when Rooms.Visible =>
                Text_Io.Put_Line ("           mode : visible");
            when Rooms.Unvisible =>
                Text_Io.Put_Line ("           mode : unvisible");
        end case;
        Text_Io.Put_Line ("        comment : " &
                          Rooms.Get_Communication_Comment);
        Rooms.Next_Communication;
        Text_Io.New_Line;
    end loop;

    Rooms.Remove_State ("cuisine", "enfumee");
    if not Rooms.In_State ("cuisine", "enfumee") then
        Text_Io.Put_Line ("la cuisine n'est plus enfumee");
    end if;


end Test_Room;

E3 Meta Data

    nblk1=5
    nid=0
    hdr6=a
        [0x00] rec0=1f rec1=00 rec2=01 rec3=036
        [0x01] rec0=12 rec1=00 rec2=02 rec3=076
        [0x02] rec0=18 rec1=00 rec2=03 rec3=05c
        [0x03] rec0=19 rec1=00 rec2=04 rec3=034
        [0x04] rec0=12 rec1=00 rec2=05 rec3=000
    tail 0x21545d43e865a3df53c55 0x42a00088462060003