|
|
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 - metrics - downloadIndex: B T
Length: 2622 (0xa3e)
Types: TextFile
Names: »B«
└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
└─⟦5cb1d1d7f⟧ »DATA«
└─⟦3b1ee7bd8⟧
└─⟦this⟧
with Text_Io;
use Text_Io;
package body Numeric_Io is
-- This ought to be done by instantiating the FLOAT_IO and INTEGER_IO
-- But if you dont yet have the generic TEXT_IO implemented yet
-- then something like this does the job on the DEC-10 IAPC
-- But it is a kludge
-- No effort has been put into making it pretty or portable
package Integer_Io is new Text_Io.Integer_Io (Integer);
package Float_Io is new Text_Io.Float_Io (Float);
use Integer_Io;
use Float_Io;
procedure Get (File : in File_Type; Item : out Integer) is
begin
Integer_Io.Get (File, Item);
end Get;
procedure Get (Item : out Integer) is
begin
Integer_Io.Get (Item);
end Get;
procedure Get (File : in File_Type; Item : out Float) is
begin
Float_Io.Get (File, Item);
end Get;
procedure Get (Item : out Float) is
begin
Float_Io.Get (Item);
end Get;
procedure Put (File : in File_Type; Item : in Integer) is
begin
Integer_Io.Put (File, Item);
end Put;
procedure Put (Item : in Integer; Width : in Field) is
J, K, M : Integer := 0;
begin
if Width = 1 then
case Item is
when 0 =>
Put ('0');
when 1 =>
Put ('1');
when 2 =>
Put ('2');
when 3 =>
Put ('3');
when 4 =>
Put ('4');
when 5 =>
Put ('5');
when 6 =>
Put ('6');
when 7 =>
Put ('7');
when 8 =>
Put ('8');
when 9 =>
Put ('9');
when others =>
Put ('*');
end case;
else
if Item < 0 then
Put ('-');
J := -Item;
else
Put (' ');
J := Item;
end if;
for I in 1 .. Width - 1 loop
M := 10 ** (Width - 1 - I);
K := J / M;
J := J - K * M;
Numeric_Io.Put (K, 1);
end loop;
end if;
end Put;
procedure Put (Item : in Integer) is
begin
Integer_Io.Put (Item);
end Put;
procedure Put (File : in File_Type; Item : in Float) is
begin
Float_Io.Put (File, Item);
end Put;
procedure Put (Item : in Float) is
begin
Float_Io.Put (Item);
end Put;
end Numeric_Io;