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,ebc5bf96039d7210 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newshub.sdsu.edu!newsfeed.straub-nv.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Sat, 30 Aug 2008 15:40:15 +0200 From: Georg Bauhaus Reply-To: rm.tsoh+bauhaus@maps.futureapps.de User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Very confused by Ada tasking, can not explain the execution outcome. References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <48b94dc0$0$11749$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 30 Aug 2008 15:40:16 CEST NNTP-Posting-Host: 7a3ada55.newsspool1.arcor-online.net X-Trace: DXC=jYjblVIDLQ9Tia]Ho99G50ic==]BZ:af>4Fo<]lROoR14nDHegD_]R5T=BaN;LlOU3A:ho7QcPOV3LQT3Dchn?[5Yb56>R?ag:2 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:1840 Date: 2008-08-30T15:40:16+02:00 List-Id: climber.cui@gmail.com wrote: > On Aug 30, 1:12 am, "Jeffrey R. Carter" >> If an exception occurs in your task, the task will terminate silently. This is a >> way your task and program could terminate although it never increments Rounds >> nor executes its final statement. > Thanks Jeff. It seems you are right. Some exceptions occurs during > the task execution, and Ada is ignoring it. Ada is not actually ignoring exceptions in tasks; the program is following the Ada rules: Add these lines, Put_Line("TASK EXITS :: rounds =" & INTEGER'Image(rounds) & "...." ); exception when X: others => Put_Line("TASK failed due to " & Ada.Exceptions.Exception_Information(X)); end User_thread; and you should see something like TASK failed due to Exception name: CONSTRAINT_ERROR Message: multi_res_alloc_a.adb:131 index check failed So, yes, > It is very likely to the > 'array index out of bound'. > I doubt that Ada follows the strict > evaluation rules when it evaluates the boolean expressions, you would specify short circuit evaluation using "and then" etc. as explained by Damien Carbonne; Ada follows the rules defined in the LRM, section "4.5.1 Logical Operators and Short-circuit Control Forms"