What does "Dim Table(10) as Byte" exactly mean :
- An array of 11 elements, with an index range from 0 to 10 (like in conventional basic) ?
- An array of 10 elements, with an index range from 1 to 10 ?
- An array of 10 elements, with an index range from 0 to 9 ?
Thanks for any answer ...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ha. To me it's dim var(10) with var(1) to (10) the elements.
The var(0) is the array lengh. (what if bigger than 255?)
gcb arrays don't start from 0. They start from 1.
your - An array of 10 elements, with an index range from 1 to 10 ? is what works for me.
Other basics start from 0, which got me at first usin gcb,
I'll get told off.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
But I remember my first microcontroller in 1993 by Rockwell, compatible 6502, with 2K "Piggyback" Eprom and 64 bytes (!) of RAM (including stack for subroutines). "Native" Assembler SM-MAE on Commodore-64 (despite of the fact that my main computer was an AT286) ... and it worked ! So I learned not to waste RAM space ... And I will not dimension my arrays bigger than really needed.
:)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What does "Dim Table(10) as Byte" exactly mean :
- An array of 11 elements, with an index range from 0 to 10 (like in conventional basic) ?
- An array of 10 elements, with an index range from 1 to 10 ?
- An array of 10 elements, with an index range from 0 to 9 ?
Thanks for any answer ...
Ha. To me it's dim var(10) with var(1) to (10) the elements.
The var(0) is the array lengh. (what if bigger than 255?)
gcb arrays don't start from 0. They start from 1.
your - An array of 10 elements, with an index range from 1 to 10 ? is what works for me.
Other basics start from 0, which got me at first usin gcb,
I'll get told off.
Bertrand, have a look at this link:
https://sourceforge.net/p/gcbasic/discussion/579126/thread/04955d11/
or search in this forum for array.
Thanks, such problems would lead eventually to malfunctions ...
Nostalgia...what's one byte out in a 1024 byte array using ssd1306 glcd. ha
But I remember my first microcontroller in 1993 by Rockwell, compatible 6502, with 2K "Piggyback" Eprom and 64 bytes (!) of RAM (including stack for subroutines). "Native" Assembler SM-MAE on Commodore-64 (despite of the fact that my main computer was an AT286) ... and it worked ! So I learned not to waste RAM space ... And I will not dimension my arrays bigger than really needed.
:)
Wow. We are so fortunate to have microcontrolllers with lots of lovely RAM.
:-)