Quote: "I was always under the impression that if I dim an array to say 17 "Dim widget[17]" then the actual array pointers were from 0 to 16 (making a total of 17 elements)"
It's a language thing
Quote: "as generally in BASIC array indexes are range inclusive ( zero to count )."
There's a generally in BASIC ?
Quote: "I always disregard the first index (the 0) and just start from 1. That makes the most sense to me..."
Me too
Quote: "I often use index 1-X and then use index zero for various things that pops up. I am sadly not consistent in using 1-X, I sometimes use 0-X where X is one less then I need"
Been there.
Language standards aside, I think it suits both sets of people at the cost of a little overhead.
If you understand Dim array[4] to mean indexes 0 to 3 then use 0 to 3
If you understand Dim array[4] to mean indexes 1 to 4 then use 1 to 4
I start at 1, but that's as much to do with data checking as any standard.
I often use zero returns from functions to indicate no result and this applies to functions which return an array index.
function Game_FindFreeItem()
for thisItem = 1 to TopItem
if Item[ thisItem ].inUse = 0 then exit
next thisItem
if thisItem > MaxItem then thisItem = 0
endfunction thisItem