Re: 0-based Indexing
- Posted by dm31 at uow.edu.au
Jul 18, 2003
>On Thu, Jul 17, 2003 at 12:33:38PM +1000, dm31 at uow.edu.au
>wrote:
>>
><snip>
>> Also, for example. say I want to use 1 byte of storage as
>my
>> index var. If I start at 0, I get from 0-255 different
>> elements, whereas if I used 1-base then I could only get 1-
>> 255.
><snip>
>
>Um, in C, int x[255] would give elements 0-254.
>Not sure what language you are talking about.
>
>jbrown
Please note that I *DID NOT* say 'int x[255]'
I said using a 1byte integer for the *INDEX*
eg,
unsigned char index
long x[256]
then using index as the 'index'
there is a big difference in what I said, and what you
presented :>
|
Not Categorized, Please Help
|
|