Re: 0-based Indexing
- Posted by jbrown105 at speedymail.org Jul 17, 2003
- 488 views
Ok now I understand. This is a pretty good point in favor of 0 based indexing. jbrown On Fri, Jul 18, 2003 at 07:49:03AM +1000, Derek Parnell wrote: > > > ----- Original Message ----- > From: <jbrown105 at speedymail.org> > To: "EUforum" <EUforum at topica.com> > Sent: Friday, July 18, 2003 5:10 AM > 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 > > > > TOPICA - Start your own email discussion group. FREE! > > -- /"\ ASCII ribbon | http://www.geocities.com/jbrown1050/ \ / campain against | Linux User:190064 X HTML in e-mail and | Linux Machine:84163 /*\ news, and unneeded MIME | http://verify.stanford.edu/evote.html