|
|
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 - metrics - download
Length: 4096 (0x1000)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Client_Driver, seg_00b1f5
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Text_Io;
with Complex_Client;
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_Client.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_Client.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_Client.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_Client.Plus (X, Y);
Text_Io.Put_Line ("");
Text_Io.Put ("X + Y = ");
when 'S' | 's' =>
Result := Complex_Client.Minus (X, Y);
Text_Io.Put_Line ("");
Text_Io.Put ("X - Y = ");
when others =>
exit;
end case;
Fio.Put (Complex_Client.Real_Part (Result));
Text_Io.Put (" + ");
Fio.Put (Complex_Client.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;
nblk1=3
nid=0
hdr6=6
[0x00] rec0=1d rec1=00 rec2=01 rec3=044
[0x01] rec0=19 rec1=00 rec2=02 rec3=010
[0x02] rec0=0d rec1=00 rec2=03 rec3=000
tail 0x21507640a81fa62957a34 0x42a00088462060003