DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦2867d3214⟧ TextFile

    Length: 2191 (0x88f)
    Types: TextFile
    Names: »B«

Derivation

└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13
    └─ ⟦124ff5788⟧ »DATA« 
        └─⟦this⟧ 
└─⟦bad92a95e⟧ Bits:30000535 8mm tape, Rational 1000, RPC 1_0_2
    └─ ⟦bb34fe6e2⟧ »DATA« 
        └─⟦15d8b76c6⟧ 
            └─⟦this⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 

TextFile

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;