[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Printing Arrays

Rather than have each array say whether to print its elements,
let the user decide after he has seen the arrays print in a brief format
that he wants to see them again in a verbose format.

Have variables array-prinlevel and array-prinlength with default
values 1 and 4.  This means that only one level of array prints its
elements, and only the first four elements at that.  Any array within
those four elements is printed without mentioning any elements.

Then have a function of no arguments which increments those variables
suitably and returns the value of *.  Suppose it is RPA (reprint
array).  It might increment array-prinlevel by 1 and array-prinlength
by 100.  After you see a value that was or included an array, just do
(RPA) and you get to see it again with more detail.

Meanwhile, programs doing explicit printing can use the same variables
to control exactly what goes on.