From: Keith Thompson <Keith.S.Thompson+u@gmail.com>
Subject: Re: What is the history behind Natural'First = 0 ?
Date: Sun, 03 May 2020 20:02:22 -0700
Date: 2020-05-03T20:02:22-07:00 [thread overview]
Message-ID: <87ftcg2yip.fsf@nosuchdomain.example.com> (raw)
In-Reply-To: 87o8r43hoa.fsf@nosuchdomain.example.com
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
> Robert A Duff <bobduff@TheWorld.com> writes:
>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>> Wikipedia says that some definitions have "natural numbers" starting
>>> with 0, and others have them starting with 1 -- and the term "whole
>>> numbers" is sometimes used to refer to the set of all integers.
>>
>> "The nice thing about standards is that there are so many to choose from."
>>
>> I seem to recall an early version of Ada (or Green) that said
>> "subtype Natural is Integer range 1..Integer'Last;". I could
>> be misremembering that, and (if true) I don't remember what the
>> 0..Integer'Last one was called.
>
> Yes, I remember that. I found a copy of the 1979 Preliminary Ada
> Reference Manual from SIGPLAN Notices, June 1979 at
>
> https://dl.acm.org/doi/pdf/10.1145/956650.956651
>
> The section covering package STANDARD says:
>
> subtype NATURAL is INTEGER range 1 .. INTEGER'LAST;
> type STRING is array (NATURAL) of CHARACTER;
>
> There was no predefined subtype starting at 0. I don't know just when
> NATURAL was changed to start at 1 and POSITIVE was introduced.
>
> (And I'm glad they decided to stop using ALL_CAPS for identifiers).
The 1980 edition had the same thing. I know there was another
preliminary version in 1982 (before the first official standard in
1983), but I don't know what it said.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips Healthcare
void Void(void) { Void(); } /* The recursive call of the void */
next prev parent reply other threads:[~2020-05-04 3:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-01 4:51 What is the history behind Natural'First = 0 ? reinert
2020-05-01 7:52 ` J-P. Rosen
2020-05-01 8:38 ` AdaMagica
2020-05-01 10:24 ` J-P. Rosen
2020-05-01 19:03 ` Keith Thompson
2020-05-01 21:36 ` Robert A Duff
2020-05-03 20:08 ` Keith Thompson
2020-05-04 3:02 ` Keith Thompson [this message]
2020-05-04 8:50 ` Paul Rubin
2020-05-04 14:22 ` Dennis Lee Bieber
2020-05-01 10:13 ` Jeffrey R. Carter
2020-05-01 18:14 ` Optikos
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox