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?

MAT

Description

The MAT command is used to either assign every element in a specified array to a single value or to assign the entire contents of one array to another. It takes the general form: 

MAT Array = expression

or

MAT Array1 = MAT Array2

Where:

  • Array, Array1 and Array2 are pre-dimensioned previously declared arrays,
  • expression can evaluate to any data type.

Note: 

If any element of the array Array2 has not been assigned a value then a runtime error message will occur. This can be avoided by coding the statement "MAT Array2 = " after the DIM statement.

An example would be as: 

DIM ARR1(45), ARR2(45)
MAT ARR2 = "Array value"
MAT ARR1 = MAT ARR2

CRT DQUOTE(ARR1(45))

to display "Array value", even though it was initially assigned to A


Go back to jBASE BASIC.

Was this article helpful?