Do things have to get more complicated?
No — you can write powerful programs without using arrays. But sometimes the complicated way is much easier (a backhoe is more complicated than a shovel, but easier to dig ditches with).
Here is an example of things getting a little bit complicated:
DIM DAY$(1 TO 7) ' Make an array of seven strings LET DAY$(1) = "Monday" ' Make "Monday" the first item LET DAY$(2) = "Tuesday" LET DAY$(3) = "Wednesday" LET DAY$(4) = "Thursday" LET DAY$(5) = "Friday" LET DAY$(6) = "Saturday" LET DAY$(7) = "Sunday" LET WHICH = 1 LET HOTDATE$ = DAY$(WHICH+2) PRINT "Important date on:", HOTDATE$ END
In this program,
the subscript in the last LET
statement is
the result of a calculation.
What does this program write out?