From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 6 Jan 93 07:57:02 GMT From: pattis@beaver.cs.washington.edu (Richard Pattis) Subject: Re: STRING starts at 1: why? Message-ID: <1993Jan6.075702.21522@beaver.cs.washington.edu> List-Id: I actually once had a list of reasons to start arrays at 0 vs 1, which I've conveniently lost. In the spirit of starting a new one, I'll try to recall what I can from the old list. An array that is a STRING probably has other special properties. Start at 1: 'LENGTH is same as 'LAST Negated indexes are unique (I used this fact once in a program) Start at 0: Mod works better (for hashing) Convient when doing work with 'polynomial-like' things Rich -- ------------------------------------------------------------------------------ Richard E. Pattis "Programming languages are like Department of Computer Science pizzas - they come in only "too" and Engineering sizes: too big and too small."