matwrite statement

The matwrite statement writes an item into the specified file.var.


matwrite array.var on {file.var,} ID.exp


This statement can optionally be written matwrite or write. If mat is omitted, a matrix write can be determined by the definition of the variable, array.var. If no dim statement appears, it is automatically treated as a dynamic array.

If file.var is omitted, the default file variable is used.

The array is truncated to the last nonnull array element. All trailing null elements are deleted. If the array is defined by a file statement, the file variable is not used.

The write, matwrite, and matwriteu statements all wait until the actual disk update takes place before continuing execution of the program. They are used for critical write-through, such as error-logging.


dim customer.item(30)
matread customer.item from customer.file,item-ID else...
matwrite customer.item on customer.file,item-ID