I'm going to guess that you're one of BCIT's students
First, TDKs tutorials would be a good place to start:
http://forum.thegamecreators.com/?m=forum_view&t=99497&b=10
Look at:
Section 1
Numeric Variables
String Variables
Single Dimension Arrays
Section 2
For to next loops
In the code snippet below is a clue on how to do the first bit. Copy and paste it into the DBC editor and run it, follow then on screen instructions and have a play around with it.
rem storing data to an array
remstart
this sets up the array.
word$ is the variable name
The number in the brackets is the number of values that that can be stored in the array
remend
dim name$(3)
remstart
This is the the basic input comand, the part in the the quotation marks
is printed to screen when the program is run, the part after the comma is the
variable that will store the word you type in (in this case the variable is called string.
remend
input "Type in a name (then press enter): ", string$
rem This line writes the value in variable "string$" to the array
name$(1) = string$
rem Simply a repeat of the first two line above but writing to the second position in the array
input "Type in a name (then press enter): ", string$
name$(2) = string$
rem Now write to the third position in the array
input "Type in a name (then press enter): ", string$
name$(3) = string$
rem prints two blank lines
print
print
remstart
This print the third value you typed to screen change the number in the brackets to 1 then rerun
the program. What happens? What happens if you change the number in the brackets to 4?
remend
print "One of the names you typed in was: ", name$(3)
rem end the program
end
remstart
You can also use a "for to next" loop to cycle through the positions in
an array. For example:
for i = 1 to 3
print "You typed in: ", name$(i)
next i
As the program loops through, the value of i increases
by 1 from 1 to 3. The number in the brackets will the go from
1 to 3, thus printing out name$(1), name$(2), name$(3)
remend
Have fun.