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,WEIRD_PORT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,81e02ab39dd58c4,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-30 14:17:13 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!cpk-news-hub1.bbnplanet.com!cambridge1-snf1.gtei.net!news.gtei.net!bos-service1.ext.raytheon.com!dfw-service2.ext.raytheon.com.POSTED!not-for-mail Message-ID: <3BDF26D8.244CC957@sparc01.ftw.rsc.raytheon.com> From: Wes Groleau Reply-To: wwgrol@sparc01.ftw.rsc.raytheon.com X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en,es-MX,es,pt,fr-CA,fr MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: I'm baffled... Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Tue, 30 Oct 2001 17:16:56 -0500 NNTP-Posting-Host: 151.168.144.162 X-Complaints-To: news@ext.ray.com X-Trace: dfw-service2.ext.raytheon.com 1004480232 151.168.144.162 (Tue, 30 Oct 2001 16:17:12 CST) NNTP-Posting-Date: Tue, 30 Oct 2001 16:17:12 CST Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:15438 Date: 2001-10-30T17:16:56-05:00 List-Id: Probably something simple, but I don't see it .... I don't think it's a compiler bug because I get the same error from Apex that I get from GNAT. But how can I get a constraint_error on line 166 of ada.strings.maps? That line is: Identity : constant Character_Mapping := I can't get either debugger to let me examine things in the run-time. Code excerpt: package ASF renames Ada.Strings.Fixed; package AS renames Ada.Strings; function Position_Of (Pattern : String) return Index is Result : Index := 47; -- just to make it any old legal value Checkpoint : Character := 'A'; begin Checkpoint := 'B'; Result := ASF.Index (Source => Word_List (Current_Index + 1 .. Word_List'Last), Pattern => Pattern, Going => AS.Forward ); Checkpoint := 'C'; if Result /= 0 then Checkpoint := 'D'; return Result; else Checkpoint := 'E'; return ASF.Index (Source => Word_List ( Word_List'First .. Current_Index - 1), Pattern => Pattern, Going => AS.Backward ); Checkpoint := 'F'; end if; Checkpoint := 'G'; exception when E : others => Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Information(E)); Ada.Text_IO.Put_Line ("Checkpoint => " & Checkpoint); Ada.Text_IO.Put_Line ("Context => " & Word_List (Current_Index - 10 .. Current_Index + 10) ); Ada.Text_IO.Put_Line ("Pattern => " & Pattern); Ada.Text_IO.Put_Line ("Current_Index => " & Integer'Image (Current_Index)); Ada.Text_IO.Put_Line ("Result => " & Integer'Image (Result)); raise; end Position_Of; Typical error output: Exception name: CONSTRAINT_ERROR Message: a-strmap.ads:166 Checkpoint => B Context => addenda addendum adhe Pattern => pri Current_Index => 117947 Result => 47 (Word_List is a BIG string) -- Wes Groleau http://freepages.rootsweb.com/~wgroleau