DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦1a2d6d7e9⟧ TextFile

    Length: 3394 (0xd42)
    Types: TextFile
    Names: »B«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Element;
with Symbol_Table;
with Text_Io;
use Symbol_Table;
procedure Test_Symb_Tab_3 is
    Ma_Valeur : Element.Value;
    Mon_Type : Element.Type_Element;
    Succes : Boolean;
    Ma_Classe : Element.Class;

    procedure Affiche_Erreur (Text : String; The_Error : Boolean) is
    begin
        Text_Io.Put_Line (Text & " : " & Boolean'Image (The_Error));
    end Affiche_Erreur;
begin
    Text_Io.Put_Line ("test de la table des symboles 3 -- la revanche");

    Symbol_Table.Insert ("var_toto", Succes);
    Affiche_Erreur ("Inserer var_toto", Succes);

    Symbol_Table.Insert ("var_titi", Succes);
    Affiche_Erreur ("Inserer var_titi", Succes);

    Symbol_Table.Insert ("rep_tata", Succes);
    Affiche_Erreur ("Inserer rep_tata", Succes);

    Symbol_Table.Set_Table ("rep_tata", Succes);
    Affiche_Erreur ("set_table rep_tata", Succes);

    Symbol_Table.Change_Current_Table ("rep_tata", Succes);
    Affiche_Erreur ("changer table courante => rep_tata", Succes);

    Symbol_Table.Insert ("var_local_tata", Succes);
    Affiche_Erreur ("Inserer var_local_tata", Succes);


    Symbol_Table.Set_Val ("var_toto", 10000, Succes);
    Affiche_Erreur ("set_val var_toto = 10000", Succes);

    Text_Io.Put_Line ("test presence globale var_toto : " &
                      Boolean'Image (Is_Visible (The_Name => "var_toto")));

    Text_Io.Put_Line ("test presence locale var_toto : " &
                      Boolean'Image (Is_Visible_Local
                                        (The_Name => "var_toto")));

    Symbol_Table.Leave_Table (Succes);
    Affiche_Erreur ("Le Retour a la Table Globale", Succes);

    Symbol_Table.Get_Val ("var_toto", Ma_Valeur, Succes);
    Affiche_Erreur ("get_val var_toto", Succes);
    Text_Io.Put_Line ("var_toto = " & Integer'Image (Ma_Valeur));

    Text_Io.Put_Line ("test presence locale var_local_tata : " &
                      Boolean'Image (Is_Visible_Local
                                        (The_Name => "var_local_tata")));

    Symbol_Table.Change_Current_Table ("rep_tata", Succes);
    Affiche_Erreur ("changer table courante => rep_tata", Succes);

    Text_Io.Put_Line ("test presence locale var_local_tata : " &
                      Boolean'Image (Is_Visible_Local
                                        (The_Name => "var_local_tata")));

    Symbol_Table.Leave_Table (Succes);
    Affiche_Erreur ("Le Retour a la Table Globale", Succes);

    Symbol_Table.Change_Current_Table ("var_toto", Succes);
    Affiche_Erreur ("changer table courante => var_toto", Succes);

    Set_Type ("var_toto", Element.Variable, Succes);
    Affiche_Erreur ("set_type var_toto", Succes);

    Get_Type ("var_toto", Mon_Type, Succes);
    Affiche_Erreur ("get_type var_toto", Succes);

    Text_Io.Put_Line ("var_toto.type = " &
                      Element.Type_Element'Image (Mon_Type));

    Set_Class ("var_toto", Element.Convert_To_Class ("rep_tata"), Succes);
    Affiche_Erreur ("set_class var_toto", Succes);

    Get_Class ("var_toto", Ma_Classe, Succes);
    Text_Io.Put_Line ("Class de var_toto : " & Ma_Classe);
    Set_Adress ("var_toto", 345, Succes);
    Affiche_Erreur ("set_adress var_toto", Succes);
    declare
        Mon_Adresse : Integer;
    begin
        Get_Adress ("var_toto", Mon_Adresse, Succes);
        Text_Io.Put_Line ("var_toto.adresse = " & Integer'Image (Mon_Adresse));
    end;
end Test_Symb_Tab_3;