MAT PRINT USING

MAT PRINT USING format_string: array
A MAT PRINT USING statement handles the elements as if they are arranged in line regardless of the dimension.
The order is that of latter index changing fast.
When the format items are exhausted, a new line is outputted and the format items are used again from the first.
Example.

100 DIM A(2,3)
110 MAT READ A
120 DATA 1,2,3,4,5,6
130 MAT PRINT USING " # # # # # #":A
140 MAT PRINT USING " # # #":A
150 MAT PRINT USING " #":A
160 END

yields
1 2 3 4 5 6
1 2 3
4 5 6
1
2
3
4
5
6


Note.
A 2-dimensional array can be outputted finely when the format is given the items of the number of the second indices.
Use a repeat$ function to compose the format string consisting of the needed number of items.
Example.

DIM A(3,4)
MAT PRINT USING REPEAT$("  #.####", 4):A


Refer to PRINT USING