User`s manual
6-4
Other Types of Arrays
Remember, in LEVEL II the number of dimensions an array can have (and
the size or depth of the array), is limited only by the amount of memory
available. Also remember that
string
arrays can be used. For example, C$(X)
would automatically be interpreted as a string array. And if you use DEFSTR
A at the beginning of your program, any array whose name begins with A
would also be a string array. One obvious application for a string array would
be to store text material for access by a string manipulation program.
10 CLEAR 1200
20 DIM TXT$(10)
would set up a string array capable of storing 10 lines of text. 1200 bytes
were CLEARed to allow for 10 sixty-character lines, plus 600 extra bytes for
string manipulation with other string variables.
Array/Matrix Manipulation Subroutines
To use this subroutine, your main program must supply values for two
variables N1 (number of rows) and N2 (number of columns). Within the
subroutine, you can assign values to the elements in the array row by row by
answering the INPUT statement.
30100 REM MATRIX INPUT SUBROUTINE (2 DIMENSION)
30110 FOR I=1 TO N1
30120 PRINT "INPUT ROW";I
30130 FOR J=1 TO N2
30140 INPUT A(I,J)
30160 NEXT J,I
30170 RETURN
-----------------------------------------------










