Looking at 4.5 Arrays in the manual it looks like you need to redefining your element from word[2] to word[3]
Looking at 4.5 Arrays in the manual it looks like you need to redefining your element from word[2] to word[3]
Thank you, Dick M. Could it be this simple?
In the manual example in section 4.5 it reads:
" shark VAR BYTE[10]
fish VAR BYTE[8]
The first array location is element 0. In the fish array defined above, the elements are numbered fish[0] to fish[7] yielding 8 elements in total."
Gee, I had previously thought that the highest element would be #7, therefore expecting the highest number element to be used in the VAR definition. After rereading the manual (how many times did I already read the manual on this, yet I missed it), it SURE LOOKS LIKE I HAD IT ALL WRONG!!!!!
Wow, all this struggling. How annoying it will be to find out that I declared my array VARs incorrectly. Of course, it would have been nice if the COMPILER would have reported an error, but I still feel like such a dunce. I will try it again and report back. MANY thanks, Dick M!
Bob
Now I must go back to PBP and try it all again!
Well, I checked my understand of dimensioning arrays in other forms of BASIC. In other BASICs,
DIM fish(20)
creates an array of 21 elements (0 through 20). Hence, the source of my confusion.
In PBP:
fish VAR WORD[20] has 20 elements (0 through 19).
Getting smarter as I go.
Bob
Bookmarks