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,103b407e8b68350b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-15 10:19:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!colt.net!diablo.theplanet.net!news-hub.cableinet.net!blueyonder!internal-news-hub.cableinet.net!news-text.cableinet.net.POSTED!53ab2750!not-for-mail User-Agent: Microsoft-Entourage/10.1.1.2418 Subject: Re: Anybody in US using ADA ? One silly idea.. From: Bill Findlay Newsgroups: comp.lang.ada Message-ID: References: <1041908422.928308@master.nyc.kbcfp.com> <1041997309.165001@master.nyc.kbcfp.com> <1042086217.253468@master.nyc.kbcfp.com> <1042477504.547640@master.nyc.kbcfp.com> <1042651417.215661@master.nyc.kbcfp.com> Mime-version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Date: Wed, 15 Jan 2003 18:19:05 GMT NNTP-Posting-Host: 80.195.52.70 X-Complaints-To: abuse@blueyonder.co.uk X-Trace: news-text.cableinet.net 1042654745 80.195.52.70 (Wed, 15 Jan 2003 18:19:05 GMT) NNTP-Posting-Date: Wed, 15 Jan 2003 18:19:05 GMT Organization: blueyonder (post doesn't reflect views of blueyonder) Xref: archiver1.google.com comp.lang.ada:33045 Date: 2003-01-15T18:19:05+00:00 List-Id: On 15/1/03 17:23, in article 1042651417.215661@master.nyc.kbcfp.com, "Hyman Rosen" wrote: > Dmitry A. Kazakov wrote: >> I think I explained why. But to avoid that discussion again, just take the >> unit solution for C++ you mentioned and try to implement a calculator for >> dimensioned values using it. > > No, I don't want to do that. If I did want to do that, > my solution would be inappropriate, but so what? Part > of designing a program is deciding what is fixed at > compile-time and what is decided at run-time. Ada has > ranged types where the ranges are fixed at compile-time [...] I've noticed you say something like this before, Hyman, and I wonder if I'm mistaking your meaning. Ada ranged types are NOT fixed at compile-time, they may be fully dynamic. E.g. You can say: procedure try is function read return integer is n : integer; begin get(n); return n; end read; SUBTYPE S IS INTEGER RANGE READ .. READ; begin put_line(integer'image(s'first) & " .. " & integer'image(s'last)); end try; $ ./try 123 456 123 .. 456 (although you probably shouldn't) -- Bill-Findlay chez blue-yonder.co.uk ("-" => "")