// ARRAYDIM arrayOne(5)DIM stringArray$(3)// SET THE VALUELET arrayOne(1) = 7LET stringArray$(1) = "Silver Creator Rocks"// VIEW ARRAY VALUEPRINT STR$(arrayOne(1))PRINT stringArray$(1)
DIM myArray$(0) //Create the array//Now fill it with greatnessAPPENDARRAY myArray$, "We're no strangers to love"APPENDARRAY myArray$, "You know the rules and so do I"APPENDARRAY myArray$, "A full commitment's what I'm thinking of"APPENDARRAY myArray$, "You wouldn't get this from any other guy"APPENDARRAY myArray$, " "APPENDARRAY myArray$, "I just wanna tell you how I'm feeling"APPENDARRAY myArray$, "Gotta make you understand"APPENDARRAY myArray$, " "APPENDARRAY myArray$, "Never gonna give you up"APPENDARRAY myArray$, "Never gonna let you down"APPENDARRAY myArray$, "Never gonna let you down, Never gonna run around and desert you"APPENDARRAY myArray$, "Never gonna make you cry"APPENDARRAY myArray$, "Never gonna say goodbye"APPENDARRAY myArray$, "Never gonna tell a lie and hurt you"//Now loop over what's in itFOR i = 1 to COUNTARRAY(myArray$) //Print off the greatness PRINT STR$(i) + " " + myArray$(i)NEXT//Cheat sheet// - DIM myArray$(0) // Creates a string array with 0 items// - COUNTARRAY(myArray$) : Gets the length of the array// - myArray$(i) : Gets the stuff out of the array as index i// - APPENDARRAY myArray$, "Stuff" : Adds a string into the array// - STR$(i) : Converts a number to a string// Hint: $ at the end of the variable means it is a string variable