🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #5207

Re: The Joy of Zero-based Arrays (My two cents)

#5207
From: Eugene Miya
Date: Thu, 03 Mar 1988 18:30
19 lines
1566 bytes
Given the choice of a 0 or 1 start, I now prefer 0, there are a few
applications where it is handy and you just make the array +1 larger,
or ignore element 0.  but this is a cludge as well.  Actually, I think
that Pascal and Ada handle this problem even better with subranges
and enumerations, but this is my quirk, Pascal's problem is those
stupid pred() and succ() operators.  Yes, range checking can be a
pain (read "reduced performance").  Another problem is how to handle
subarrays.  Implementation is row or column major (See comp.lang.fortran)
and this is an unfortunate detail.  There are other array tricks coming
down the pipe (read Fortran 8X) but when it boils down to either
1 based or 0 based are both arbitrary (ridiculous since either side can
find counter arguments).

From the Rock of Ages Home for Retired Hackers:

--eugene miya, NASA Ames Research Center, eugene@ames-aurora.ARPA
  "You trust the `reply' command with all those different mailers out there?"
  "Send mail, avoid follow-ups.  If enough, I'll summarize."
  {uunet,hplabs,hao,ihnp4,decwrl,allegra,tektronix}!ames!aurora!eugene
Technical Details
Message-ID: <248@eos.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!lll-winken!lll-tis!ames!eos!eugene
References: <1012@PT.CS.CMU.EDU> <17419@think.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!lll-winken!lll-tis!ames!eos!eugene
From: eugene@eos.UUCP (Eugene Miya)
Newsgroups: comp.lang.misc
Subject: Re: The Joy of Zero-based Arrays (My two cents)
Message-ID: <248@eos.UUCP>
Date: 3 Mar 88 18:30:03 GMT
References: <1012@PT.CS.CMU.EDU> <17419@think.UUCP>
Reply-To: eugene@eos.UUCP (Eugene Miya)
Organization: NASA Ames Research Center, Calif.
Lines: 18
Summary: Considering other languages.