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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1901f265c928a511 X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news.illinois.net!attcg1!ip.att.net!news.binc.net!kilgallen From: Kilgallen@SpamCop.net (Larry Kilgallen) Newsgroups: comp.lang.ada Subject: Re: Typing in Ada Date: 31 May 2004 22:27:56 -0600 Organization: LJK Software Message-ID: References: <2i1t1lFij4g5U1@uni-berlin.de> <9ZRuc.8410$hB2.7017@nwrdny03.gnilink.net> NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1086060448 8917 192.135.80.34 (1 Jun 2004 03:27:28 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Tue, 1 Jun 2004 03:27:28 +0000 (UTC) Xref: controlnews3.google.com comp.lang.ada:979 Date: 2004-05-31T22:27:56-06:00 List-Id: In article <9ZRuc.8410$hB2.7017@nwrdny03.gnilink.net>, Hyman Rosen writes: > Nick Roberts wrote: > > That is to say that in most Ada >> programs it is typical to have constructions such as: >> type Apples is range 0..100; >> type Oranges is range 0..200; > > Is it really? The very fact that you have named these types as > you did suggests that the appplicability of ranged types is quite > limited. In a real program that does something useful, what kinds > of things do you want to count up to 100 but not to 101? To 200 > but not to 201? Can you give examples from some of your real code? Apples and Oranges are typically used in discussions, but limiting the range from 0 to 101 is quite common if you are counting votes in the US Senate. Or 0 to 100 and treat the tiebreaker situation like the special case that it is. A count of 0 to 435 (437?) House votes likewise has limited range, and there is no situation in which the two are to be added (unlike the corresponding Massachusetts State Government votes).