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,ae9506fd4dcf7090 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-24 07:05:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Matthew Heaney" Newsgroups: comp.lang.ada Subject: Re: Concatenation and Characters Date: Thu, 24 Oct 2002 10:04:25 -0400 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:30095 Date: 2002-10-24T10:04:25-04:00 List-Id: "Grein, Christoph" wrote in message news:mailman.1035439204.28367.comp.lang.ada@ada.eu.org... > > Many Ada83 programmers made the same mistake: assuming that there's an > > automatic check when indexing an array. There was not, in Ada83. There is > > now, in Ada95. > > RM83 4.1.1(4) > ... The exception CONSTRAINT_ERROR is raised if an index value does not belong > to the range of the corresponding index of the prefixing array ... > > > A: array (Some_Range) of Something; > > I: Some_Range; > J: Integer; > > A (I) - the range check can be omitted And there you see the problem. If index I is initialized with garbage, then program execution is errnoneous as soon as you use I to index into the array. If you're lucky you'll get a core dump.