The MATWRITE statement writes the elements of a dimensioned array as attributes of a file item.
Format
MATWRITE array ON [filevar,] item-ID |
Parameter(s)
array |
An expression evaluating to the dimensioned array to write into the file item. |
filevar |
Variable to which the file was opened. If filevar is not specified, the default file variable is used, which is the file most recently opened without an assigned file variable. |
item-ID |
An expression evaluating to the item-ID of the item to be written. |
Description
The MATWRITE statement writes a dimensioned array onto a file item, overwriting any data previously stored in that item. If the file item does not exist, a new item is created.
Example
To write the dimensioned array EMPLOYEE into a file item with item-ID NAME in the file opened as EMP.FILE, the code would read:
MATWRITE EMPLOYEE ON EMP.FILE , NAME |
See Also