return to first page linux journal archive
keywordscontents

Listing 1. The file spreadsheet.i3

INTERFACE Spreadsheet;

IMPORT Money;

  TYPE
    Grid: REF ARRAY OF ARRAY OF Money.T;

    T = OBJECT
      grid: Grid;
      name: TEXT;
    METHODS
      init    (row, col: INTEGER): T;
      getCell (row, col: INTEGER): Money.T;
      putCell (row, col: INTEGER; value: Money.T);
    END;

  PROCEDURE Read (filename: TEXT): T;
  PROCEDURE Save (filename: TEXT; sheet: T);

END Spreadsheet.