Re: 0-based Indexing
- Posted by Derek Parnell <ddparnell at bigpond.com> Jul 17, 2003
- 510 views
----- Original Message ----- From: <jbrown105 at speedymail.org> To: "EUforum" <EUforum at topica.com> Subject: Re: 0-based Indexing > > > 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. Jim, he is not talking about declaring an array with a '255', but using a BYTE to hold the entire set of index values for an array 0-255. To declare such an array he would write "int x[256]" of course. -- Derek