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: 2191 (0x88f) Types: TextFile Names: »B«
└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13 └─ ⟦124ff5788⟧ »DATA« └─⟦this⟧ └─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16 └─ ⟦6f12a12be⟧ »DATA« └─⟦this⟧
with Text_Io; with Complex_Number; procedure Client_Driver is package Fio is new Text_Io.Float_Io (Float); X_Real_Part : Float; X_Imag_Part : Float; Y_Real_Part : Float; Y_Imag_Part : Float; Next_Op : Character; Result, X, Y : Complex_Number.Number; begin Text_Io.Put_Line ("This program demonstrates the RPC facility."); Text_Io.Put_Line ("The service allows clients to perform complex number arithmatic."); Text_Io.Put_Line ("You will be prompted to enter two complex numbers: X and Y,"); Text_Io.Put_Line ("and either addition or subtraction as the operation."); Text_Io.Put_Line (""); Text_Io.Put_Line (""); loop Text_Io.Put_Line ("Enter X Real Part ('Q' for Quit)"); Fio.Get (Item => X_Real_Part, Width => 0); Text_Io.Put_Line ("Enter X Imaginary Part ('Q' for Quit)"); Fio.Get (Item => X_Imag_Part, Width => 0); X := Complex_Number.Make (X_Real_Part, X_Imag_Part); Text_Io.Put_Line ("Enter Y Real Part ('Q' for Quit)"); Fio.Get (Item => Y_Real_Part, Width => 0); Text_Io.Put_Line ("Enter Y Imaginary Part ('Q' for Quit)"); Fio.Get (Item => Y_Imag_Part, Width => 0); Y := Complex_Number.Make (Y_Real_Part, Y_Imag_Part); Text_Io.Put_Line (""); Text_Io.Put_Line ("Enter 'A' for Addition, 'S' for Subtract, or 'Q' for Quit"); Text_Io.Get (Next_Op); case Next_Op is when 'A' | 'a' => Result := Complex_Number.Plus (X, Y); Text_Io.Put_Line (""); Text_Io.Put ("X + Y = "); when 'S' | 's' => Result := Complex_Number.Minus (X, Y); Text_Io.Put_Line (""); Text_Io.Put ("X - Y = "); when others => exit; end case; Fio.Put (Complex_Number.Real_Part (Result)); Text_Io.Put (" + "); Fio.Put (Complex_Number.Imaginary_Part (Result)); Text_Io.Put_Line ("i"); Text_Io.Put_Line (""); Text_Io.Put_Line (""); end loop; exception when others => null; end Client_Driver; pragma Main;