O.K. waz. I think you've got the basic gist of it, but arrays can be a bit confusing at first.
Try this instead:
The reason why print cup$(a) wouldn't work is because the variable a is undefined once the for..next loop terminated. If you want to display the whole array, try this:
I hope that makes sense.
Have fun.
Try this instead:
Dim cups$(10) For a = 0 To 9 ; we've only got 10 elements in the array and 0 is a number. cups$(a) = "rat "+a Next Print cups$(5) ; display the contents of element 5 in the array cup$ (actually the 6th element.
The reason why print cup$(a) wouldn't work is because the variable a is undefined once the for..next loop terminated. If you want to display the whole array, try this:
Dim cups$(10) For a = 0 To 9 ; we've only got 10 elements in the array and 0 is a number. cups$(a) = "rat "+a Next for b=0 to 9 Print cups$(b) ; display the contents of element b in the array cup$. next
I hope that makes sense.
Have fun.