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 X-Google-Thread: 103376,ee1a8b8db84c88f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!news.musoftware.de!newsfeed.kamp.net!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada exception block does NOT work? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <4301ab29$0$6989$9b4e6d93@newsread2.arcor-online.net> Date: Sun, 21 Aug 2005 11:01:41 +0200 Message-ID: <1rhqlfukshdbg$.80u1rd9uonao.dlg@40tude.net> NNTP-Posting-Date: 21 Aug 2005 11:01:38 MEST NNTP-Posting-Host: d53edb02.newsread2.arcor-online.net X-Trace: DXC=lCWV20PKS;YC3N6I?YBjS[Q5U85hF6f;TjW\KbG]kaMXlSE5DYV?adQ5g[:TIVW\UR[6LHn;2LCV^I^><>f3dFYZmH>VdfIII7U X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:4234 Date: 2005-08-21T11:01:38+02:00 List-Id: On 20 Aug 2005 17:34:51 -0400, Robert A Duff wrote: > I'd use "Integer" for what Lisp calls "bignums" -- integers that can > grow without bound (except of course you can run out of memory, > but that's true of Strings and whatnot, too. I'd call the integer type > that is based on the hardware (e.g. 32-bit integers) "Machine_Integer". > And I wouldn't put it in a package called "Standard" and I wouldn't > make it automatically visible everywhere. > > I think one ought to be allowed to say: > > type T is range 1..10**100; But that wouldn't be an "integer" you have described! What you want seems to me rather the Universal_Integer: X : Universal_Integer; -- No overflows, ever. Storage_Error instead subtype T is Universal_Integer range 1..10**100; -- No overflows in any numerical operations, only when value is stored > Portably. Sure! I think it wouldn't be that difficult to do, I mean to expose Universal_Integer. However range checks might be tricky to do without overhead. The memory required to keep bounds might be bigger than all actual values! Though it is unlikely that somebody would really need to constrain Universal_Integer by 10**100 instead of using the base type. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de