Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?

MATWRITEU

Description

The MATWRITEU statement transfers the entire contents of a dimensioned array to a specified record on file, in the same manner as the MATWRITE statement. An existing record lock will be preserved. It takes the general form:

MATWRITEU array ON { variable,}expression {SETTING setvar} {ON ERROR statements}

Where:

  • array should be a previously dimensioned and initialized array. If specified, variable should be a previously opened file variable (i.e. the subject of an OPEN statement). If variable is not specified the default file variable is used.
  • expression should evaluate to the name of the record in the file.
  • If the SETTING clause is specified and the write succeeds, setvar will be set to the number of attributes read into array. If the SETTING clause is specified and the write fails, setvar will be set to one of these values.

If ON ERROR is specified, the statements following the ON ERROR clause will be executed for any of these values except error 128.

The compiler will check that the variable specified is indeed a dimensioned array before its use in the statement.

An example of use is as: 

DIM A(8)
MAT A = 99
....
MATWRITEU A ON "NewArray"


Go back to jBASE BASIC.

Was this article helpful?