Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ARRAY of STRING (solved)
#1
I'm a bit confused.

How do I do this?

DIM Board$(3,4)
LET Board$(1) = "ABCD"
LET Board$(2) = "EFGH"
LET Board$(3) = "IJKL"
Reply
#2
You can do that as in normal Sinclair BASIC. Use READ, DATA:

Code:
DIM Board$(3): REM You don't need to specify the max length of each row.
DIM i As UInteger
FOR i = 1 TO 3
    READ Board(i)
NEXT i

DATA "ABCD", "EFGH", "IJKL"
Reply
#3
And instead of
Board$(2,3)

I should use
Board$(2)(3)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)