showtbl.icn: Procedure to show contents of a table

procedure showtbl:         show table contents

link showtbl
March 25, 2002; Ralph E. Griswold
This file is in the public domain.

showtbl(title, tbl, sort_type, limit, sort_order, posit,
  w1, w2, gutter, f1, f2) displays tbl according to the arguments given.

The arguments are:

position     name            meaning                 default/alternative

   1         title           heading title           ""
   2         tbl             table to be shown
   3         sort_type       type of sorting         "ref"/"val"
   4         limit           lines of table output   essentially infinite
   5         sort_order      increasing/decreasing   "incr"/"decr"
   6         posit           first column            "val"/"ref"
   7         w1              width of 1st column     10
   8         w2              width of 2nd column     10
   9         gutter          width between columns   3
  10         f1              function of 1st column  left
  11         f2              function of 2nd column  right

showtbl() returns a record with the first element being a count of
the size of the table and the second element the number of lines
written.
____________________________________________________________

This procedure just grew.  It needs rewriting.
And it has far too many arguments.
____________________________________________________________

Deficiencies:  Several features are not yet implemented.  sort_order
               and posit have no effect.  In the case of sort_type
               "val", the sorting order is decreasing.

Source code | Program Library Page | Icon Home Page