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: ┃ T V

⟦2daffa943⟧ TextFile

    Length: 1853 (0x73d)
    Types: TextFile
    Names: »V«

Derivation

└─⟦d10a02448⟧ Bits:30000409 8mm tape, Rational 1000, ENVIRONMENT, D_12_7_3
    └─ ⟦fc9b38f02⟧ »DATA« 
        └─⟦9b46a407a⟧ 
            └─⟦12c68c704⟧ 
                └─⟦this⟧ 
└─⟦5f3412b64⟧ Bits:30000745 8mm tape, Rational 1000, ENVIRONMENT 12_6_5 TOOLS 
    └─ ⟦91c658230⟧ »DATA« 
        └─⟦458657fb6⟧ 
            └─⟦220843204⟧ 
                └─⟦this⟧ 

TextFile

with Io;

-- This package is used to produce neatly formatted tables with centered
-- headers and even amounts of white space between the columns.  The first
-- N calls should be to header, which defines a header and a type of
-- justification for the items that will go into each column.  Then the M*N
-- items of an M line table are sent into the package a row at a time.  An
-- item is defined by either a single call to Item, or a series of zero or
-- more calls to Subitem terminated by a call to Last_Subitem.  Multiple
-- parts of an item are separated by the subitem separator.  After all the
-- items have been defined, the table is output with a call to Display.

-- The package internally allocates enough memory to save a copy of the
-- entire table.   It is therefore a good idea to instantiate this
-- procedure in a local frame so that all the memory it allocates will go
-- away when the frame does.

-- An instantiation of this package will generate at most one table.
-- It is NOT possible to start over calling Header after Display.


generic
    Number_Of_Columns : Positive;
    Subitem_Separator : String := " ";
package Table_Formatter is


    type Adjust is (Left, Right, Centered);
    procedure Header  (S : String; Format : Adjust := Left);
    procedure Item    (S : String);
    procedure Subitem (S : String);
    procedure Last_Subitem;
    procedure Display (On_File : Io.File_Type);


    type Field_List is array (Integer range <>) of Integer;
    -- For N > 0 sort by field N in increasing order.
    -- For N < 0 sort by field abs (N) in decreasing order.
    -- Sorting is done on input value before right adjustment or centering.

    procedure Sort (On_Field : Integer := 1);
    procedure Sort (On_Fields : Field_List);

    pragma Subsystem (Input_Output);
    pragma Module_Name (4, 3217);
end Table_Formatter;