|
|
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: 5120 (0x1400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, seg_00b21a
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦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=4
nid=0
hdr6=8
[0x00] rec0=1d rec1=00 rec2=01 rec3=06a
[0x01] rec0=00 rec1=00 rec2=04 rec3=00a
[0x02] rec0=1b rec1=00 rec2=02 rec3=014
[0x03] rec0=0b rec1=00 rec2=03 rec3=001
tail 0x2170823d881fa62b6df04 0x489e0066482863c01