GENERIC
PACKAGE Spreadsheet.IO IS
------------------------------------------------------------------
--| Specification for generic child IO package
--| for a simple spreadsheet.
--|
--| Authors: Duane Jarc, Michael Feldman
--| The George Washington University
--| Last Modified: October 1996
------------------------------------------------------------------
TYPE Column_Slices IS PRIVATE;
FUNCTION "-"(From, To: Columns) RETURN Column_Slices;
-- Pre: From and To are defined
-- Post: Returns a slice of a spreadsheet, i.e., a set of columns
PROCEDURE Set(Column_Slice: IN Column_Slices; Width: IN Positive);
-- Pre: Column_Slice and Width are defined
-- Post: Sets the print width for the given slice.
-- Example: Set(Column_Slice=>B-F, Width =>5)
-- results in a print width of 5 for each value in each column B-F
PROCEDURE Print(Block: IN Blocks);
-- Pre: Block is defined
-- Post: Displays the entire block, using each column's print width.
-- The default width is 4.
PRIVATE
TYPE Column_Slices IS RECORD
From: Columns;
To: Columns;
END RECORD;
Column_Widths: ARRAY(Columns) OF Positive := (OTHERS => 4);
END Spreadsheet.IO;