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,2c52e9e46bd47415 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-03 07:49:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!feed.news.nacamar.de!uio.no!ntnu.no!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: Re: FW: Ada 200X Date: Tue, 3 Jun 2003 14:49:04 +0000 (UTC) Organization: Norwegian university of science and technology Message-ID: References: NNTP-Posting-Host: kiuk0152.chembio.ntnu.no X-Trace: tyfon.itea.ntnu.no 1054651744 1922 129.241.83.78 (3 Jun 2003 14:49:04 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Tue, 3 Jun 2003 14:49:04 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:38488 Date: 2003-06-03T14:49:04+00:00 List-Id: Erlo Haugen wrote: > Wouldn't > subtype day_number is natural range 1..31; > type month_days is array (day_number) of some_other_type; > > eliminate the boundschecking?? Not sure what you mean here. procedure testing is subtype day_number is natural range 1..31; type month_days is array (day_number) of Integer; Mai : month_days; begin Mai (32) := 1; end testing; gnatmake testing.adb gnatgcc -c testing.adb testing.adb:6:09: warning: value not in range of type "day_number" defined at line 2 testing.adb:6:09: warning: "constraint_error" will be raised at run time gnatbind -x testing.ali gnatlink testing.ali ./testing raised CONSTRAINT_ERROR : testing.adb:6 -- Preben Randhol http://www.pvv.org/~randhol/