DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ B T ┃
Length: 2173 (0x87d) Types: TextFile Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11 └─ ⟦129cab021⟧ »DATA« └─⟦this⟧
with Action; with Role; with Serial_Io; with Station_Identifier; with Step; with Text_Io; with My_Time; package body Moteur is task type Station is entry Set_Info (The_Time : My_Time.Object; The_Action : Action.Object); entry Go; end Station; type Pstation is access Station; type Set_Of_Stations is array (Station_Identifier.Object (1) .. Station_Identifier.Object (250)) of Pstation; Max_Station_Id : Station_Identifier.Object; My_Station : Set_Of_Stations; task body Station is separate; procedure Open (Nom : String; The_File : in out Text_Io.File_Type) is M : Text_Io.File_Mode := Text_Io.In_File; begin Text_Io.Open (File => The_File, Mode => M, Name => Nom, Form => ""); end Open; procedure Close (The_File : in out Text_Io.File_Type) is begin Text_Io.Close (The_File); end Close; procedure Init (The_File : String) is The_Station_Id : Station_Identifier.Object; The_Time : My_Time.Object; The_Action : Action.Object; The_Spectacle : Text_Io.File_Type; use Station_Identifier; begin Open (The_File, The_Spectacle); Max_Station_Id := Station_Identifier.Get_From_File (The_Spectacle); Text_Io.Skip_Line (The_Spectacle); for I in 1 .. Max_Station_Id loop My_Station (I) := new Station; end loop; while not Text_Io.End_Of_File (The_Spectacle) loop The_Station_Id := Station_Identifier.Get_From_File (The_Spectacle); The_Time := My_Time.Get_From_File (The_Spectacle); The_Action := Action.Get_From_File (The_Spectacle); if The_Station_Id > Max_Station_Id then Text_Io.Put_Line ("Trop grand"); else My_Station (The_Station_Id).Set_Info (The_Time, The_Action); end if; Text_Io.Skip_Line (The_Spectacle); end loop; Close (The_Spectacle); end Init; procedure Go is begin for I in 1 .. Max_Station_Id loop My_Station (I).Go; end loop; end Go; end Moteur;