11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

MAT<br />

Syntax<br />

MAT dim.array = expr<br />

MAT dim.array = MAT dim.array2<br />

Description<br />

The first form of the <strong>UniBasic</strong> MAT command assigns new values to all elements of<br />

a dimensioned array based on an expression.<br />

The second form assigns the contents of a dimensioned array to another dimensioned<br />

array.<br />

If you assign a dimensioned array the values of a second dimensioned array, the<br />

assignment proceeds from element to element in consecutive order. The program<br />

assigns the first element of the first array to the first element of the second array, then<br />

assigns the second element to the second element of the second array, and so on. The<br />

two arrays do not have to match in configuration of dimensions, but must contain the<br />

same number of elements. UniData does not alter the second dimensioned array in<br />

the assignment process.<br />

Use the DIM command to dimension all arrays before you assign new values to the<br />

elements. You can place MAT in any looping structure and assign the elements with<br />

a variable or function.<br />

1-436 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!