ARRREST(<C filename>, [<array name>])
Restores a one-dimensional array from a disk file.
Returns <expL> true if restored properly, otherwise false.

Default file extension is .ARR

<numeric | logical> = ARRREST(<C filname>, [<array name>])
One parameter returns the number of elements in an array file.
Two parameters return the number of elements restored.
Any error returns -1.

Note that the filename is passed as a character expression and the
array name is passed as a literal. For example:

* Saving.
DECLARE my_array[100]
.
. <fill array>
.
IF .NOT. ARRSAVE("arrays.arr", my_array)
? "Error saving array to file."
ENDIF

* Restoring.
elements = ARRREST("arrays.arr")
IF elements = -1
? "Error restoring from array file."
ELSE
DECLARE my_array[elements]
IF elements # ARRREST("arrays.arr", my_array)
? "Error in number of elements restored."
ENDIF
ENDIF

It is NOT an error to have less or more elements in the array being
restored. If there are less elements in the array than in the file,
the file's excess are ignored. If there are more elements in the
array than in the file, the excess elements are not changed.


Placed in the Public Domain by Tom Rettig Assoc.