From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "G.B." Newsgroups: comp.lang.ada Subject: Re: Community Input for the Maintenance and Revision of the Ada Programming Language Date: Thu, 5 Oct 2017 08:50:08 +0200 Organization: A noiseless patient Spider Message-ID: References: <325cf1db-bd9e-4f58-a07b-f297960df269@googlegroups.com> <457e2526-d4b6-4999-8521-64f8b6a0810f@googlegroups.com> <561e1aa0-d6a5-40cf-a585-e31aef767460@googlegroups.com> <19dac7a1-0d8f-407b-91a1-864881f97ea5@googlegroups.com> Reply-To: nonlegitur@notmyhomepage.de Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 5 Oct 2017 06:50:09 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="abc822293639be82354811d62601766d"; logging-data="25541"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18kYZNdeh/nfhJ7hzh6qTUKdtd2mGt2oPg=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 In-Reply-To: Content-Language: en-US Cancel-Lock: sha1:23+HYoxMy/OvXLobcqLsKnpI+ok= Xref: news.eternal-september.org comp.lang.ada:48360 Date: 2017-10-05T08:50:08+02:00 List-Id: On 05.10.17 00:04, Dmitry A. Kazakov wrote: > On 2017-10-04 23:45, G.B. wrote: > >> Ada ranges would also be used in for loops that make the program >> step through the set of values of the range: > > Only ranges of discrete types. Yes. Good hint at Time, also? > Float range cannot be enumerated. Actually, it depends. Just like there are functions that compute discrete values from Time arguments, there are functions that compute a finite set of values from Float arguments. But these are not of a discrete type. procedure Enumerate_Float (A, B : Float) is P : Integer; F : Float; begin P := 0; F := A; loop exit when F > B; Eio.Put (P); Fio.Put (F); New_Line; P := Integer'Succ (P); F := Float'Succ (F); end loop; end Enumerate_Float; But there is no automatic stepping through the values of a floating point subtype's range, using a for loop. I cannot see a meaningful use case. Considering types of 2D object, people might want to have the notion of *range* include the idea of areas in the plane... Is there a 2D time, BTW?