ARRSAVE(<C filename>, <array name>)
Saves a one-dimensional array to a disk file.
Returns <expL> true if written properly to disk, otherwise false.
Default file extension is .ARR
IF .NOT. ARRSAVE( "Arrfile", "oldarray" )
? "Error -- file was not written."
ENDIF
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
Placed in the Public Domain by Tom Rettig Assoc.