Funky Arrays
Jan 4, 2008 9:29:04 GMT -5
Post by Janet on Jan 4, 2008 9:29:04 GMT -5
This code
balks at the second line. YET, if you add PRINT statements
The code compiles, runs and displays as expected. You can assign the array value to a string value to make it work as well. Run this code with the last 3 lines commented out and uncommented out.
Is this some type of efficiency programming -- Run BASIC won't let you set aside memory for arrays unless you're actually going to USE those arrays ???
MyArray1$(1) = "Array Number 01"
MyArray2$(1) = "Array Number 02"
MyArray3$(1) = "Array Number 03"
End
balks at the second line. YET, if you add PRINT statements
MyArray1$(1) = "Array Number 01"
MyArray2$(1) = "Array Number 02"
MyArray3$(1) = "Array Number 03"
Print MyArray1$(1)
Print MyArray2$(1)
Print MyArray3$(1)
End
The code compiles, runs and displays as expected. You can assign the array value to a string value to make it work as well. Run this code with the last 3 lines commented out and uncommented out.
MyArray1$(1) = "Array Number 01"
MyArray2$(1) = "Array Number 02"
MyArray3$(1) = "Array Number 03"
'null$ = MyArray1$(1)
'null$ = MyArray2$(1)
'null$ = MyArray3$(1)
End
Is this some type of efficiency programming -- Run BASIC won't let you set aside memory for arrays unless you're actually going to USE those arrays ???