comp.lang.ada
 help / color / mirror / Atom feed
* Re: STRING starts at 1: why?
@ 1993-01-06  7:57 Richard Pattis
  0 siblings, 0 replies; only message in thread
From: Richard Pattis @ 1993-01-06  7:57 UTC (permalink / raw)


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."

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1993-01-06  7:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-01-06  7:57 STRING starts at 1: why? Richard Pattis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox