.he 'NEWANYARRAY''Page %'
.fo 'Steven Hardy''January 78'
NEWANYARRAY	This function is used to create arrays;  to do this it needs
four arguments of which the second is optional:-
.bi
(1)   A boundslist (a list of integers) specifying the size
of the array.  If the list has 2N integers an N-dimensional array is
created.  The Kth pair of integers specifies the bounds of the Kth
dimension - is the permitted range of values for the Kth subscript of
the array to be created.
[1 10] specifies a one-dimensional array, components numbered
from one to ten, whereas [1 10 3 20] specifies a two dimension array of
180 elements.
The lower bound need not be 1 (as here), example [-5 5] specifies
a one dimensional array with eleven components.
.br
(2)   A function to specify the initial contents of 
the array.  This function will be applied to every possible
set of subscript values and the results stored in the array.  The
function must take N arguments if the array is N-dimensional.  Thus
to initialize a two-dimensional array with zeroes we could supply
the function LAMBDA (X,Y); 0 END;  since this function returns 0 for
all X and Y.  This argument is optional.  If not supplied, the array
is initialized with zeroes.
.br
(3)   A function to create space in which to store the
array.
Typically this will be a strip creator like INIT or INITC.
.br
(4)   A function to access the space created by the third
argument.  E.g. SUBSCR or SUBSCRC.
Example, to create and assign to PIC a two-dimensional ten by ten
array of characters filled with the character code for "A" use
 	: NEWANYARRAY([1 10 1 10],
 	:	LAMBDA (X Y); ASCII 'A' END,
 	:	INITC,
 	:	SUBSCRC) -> PIC;
 	: PIC(3,6) =>
 	: ASCII 'B' -> PIC(3,6);
.br
.ei

An array is a function with an updater, and can be used in
the same way as any other function.  E.g. FNPROPS can be 
applied to it.
