basic.matwrite Statement/BASIC Program

basic.matwrite

Command basic.matwrite Statement/BASIC Program
Applicable release versions: AP, R83
Category BASIC Program (486)
Description writes an item into the specified file.variable.

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

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

The "matwriteu" statement is identical to the "matwrite" statement, except the item remains locked. The "u" form keeps the item locked if it was previously locked by a "readu", "readvu", or "matreadu" statement within the same program.

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

The "writex", "matwritex" and "matwritexu" statements all have the property of waiting until the actual disk update takes place before continuing execution of the program. They are used for "critical" write-through, such as error-logging.
Syntax {mat}write{x}{u} array.variable on {file.variable,} id.expression
Options
Example
dim customer.item(30)
matread customer.item from customer.file,item.id else ..
customer.item(1)=newname
customer.item(30)=date()
matwrite customer.item on customer.file,item.id
Purpose
Related basic.matread
basic.dim
basic.matbuild
basic.matparse
basic.id.expression
basic.release
basic.file.variable
basic.default.files
basic.array.dimensioned
basic.statements
basic.write
basic.matwriteu
basic.array.references
basic.mat
basic.array.variable
basic.begin.work