|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 5120 (0x1400) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Test, seg_0476df
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Text_Io, Unbounded_String, Io, Io_Exceptions; procedure Test is package Unlimited_String is new Unbounded_String (10); type Rule is record Probabitite : Natural; Left_Part : Unlimited_String.Variable_String; Right_Part : Unlimited_String.Variable_String; end record; type Object is access Rule; Bad_Structure_Fichier : exception; Fichier_Inexistant : exception; procedure Create_Rule_Table (Rule_File_Name : in String; Rule_Table : Object) is Fichier_Handle : Text_Io.File_Type; Nbr_Of_Rules, The_Proba, The_Left_Part, The_Right_Part : String (1 .. 160) := (others => ' '); Last : Natural; begin Text_Io.Open (Fichier_Handle, Text_Io.In_File, Rule_File_Name); Create (Rule_Table); Text_Io.Get_Line (Fichier_Handle, Nbr_Of_Rules, Last); for I in 1 .. (Integer'Value (Nbr_Of_Rules)) loop Text_Io.Get_Line (Fichier_Handle, The_Proba, Last); Text_Io.Get_Line (Fichier_Handle, The_Left_Part, Last); Text_Io.Get_Line (Fichier_Handle, The_Right_Part, Last); Insert (Rule_Table, The_Rule); end loop; Text_Io.Close (Fichier_Handle); exception when Text_Io.End_Error => raise Bad_Structure_Fichier; when Io_Exceptions.Device_Error | Io_Exceptions.Name_Error | Io_Exceptions.Mode_Error => raise Fichier_Inexistant; end Create_Rule_Table; begin Create_Rule_Table ("fichier_regles", Rule_Table); exception when Bad_Structure_Fichier => Text_Io.Put_Line ("mauvaise_structure de fichier"); when Fichier_Inexistant => Text_Io.Put_Line ("fichier inexistant"); end Test;
nblk1=4 nid=4 hdr6=4 [0x00] rec0=21 rec1=00 rec2=01 rec3=054 [0x01] rec0=1c rec1=00 rec2=03 rec3=000 [0x02] rec0=03 rec1=00 rec2=02 rec3=000 [0x03] rec0=03 rec1=00 rec2=02 rec3=000 tail 0x2174af374865469d50345 0x42a00088462060003 Free Block Chain: 0x4: 0000 00 02 03 fb 80 1d 27 56 61 6c 75 65 20 28 4e 62 ┆ 'Value (Nb┆ 0x2: 0000 00 00 00 1e 80 09 69 73 74 61 6e 74 22 29 3b 09 ┆ istant"); ┆