DIM
Defining an array of various types.
string
Defining an array of strings and using the variable
Example
DIM test$=("kytschBASIC","is","awesome!")
FOR val$ IN test$
PRINT val$
PRINT " "
NEXT
Output
kytschBASIC is awesome!
integer
Defining an array of integers and using the variable
Example
DIM test%=(1,2,3)
FOR val% IN test%
PRINT val%
PRINT ", "
NEXT
Output
1, 2, 3,
double
Defining an array of doubles and using the variable
Example
DIM test#=(1.01,2.02,3.03)
FOR val# IN test#
PRINT val#
PRINT ", "
NEXT
Output
1.01, 2.02, 3.03,
Blank arrays
Defining a blank array and writing to it.
Note: Array's start at index 0
Example
DIM test$=()
FOR iLoop%=0 TO 10
LET test$(iLoop%)="array element" + iLoop%
NEXT
FOR val$ IN test$
PRINT val#
LINE BREAK
NEXT
Output
array element0
array element1
array element2
array element3
array element4
array element5
array element6
array element7
array element8
array element9
array element10
array element1
array element2
array element3
array element4
array element5
array element6
array element7
array element8
array element9
array element10