MAT REDIM (original Enhancement)
MAT REDIM
re-defines the lower bounds and the upper bounds of indices of arrays.
Any MAT REDIM statements do not initialize the elements of arrays
Example.
OPTION BASE 1 DIM A(10) MAT A=ZER(0 TO 4)
makes the range of indices of A from 1 to 5, while
MAT REDIM A(0 TO 4)
makes the range of indices of A from 0 to 4.
Note.
Since this statement is not contained in the standard, it is recommend that this statement should be used only when the lower bounds are needed to be changed.
To change the upper bounds, use
MAT A=ZER(n) MAT A=ZER(m,n)
etc.
[Supplement]
If you want to change the lower bounds within the Full BASIC standard, write such an external subprogram as shown below.
EXTERNAL SUB REDIM(a(),m,n) DATA 1 ! dummy data MAT READ a(m TO m) MAT a=ZER(m TO n) END sub
Refer to MAT statements