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-Thread: 103376,ebc5bf96039d7210 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!attbi_s21.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" 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; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s21 1220073179 12.201.97.213 (Sat, 30 Aug 2008 05:12:59 GMT) NNTP-Posting-Date: Sat, 30 Aug 2008 05:12:59 GMT Organization: AT&T ASP.att.net Date: Sat, 30 Aug 2008 05:12:59 GMT Xref: g2news2.google.com comp.lang.ada:7561 Date: 2008-08-30T05:12:59+00:00 List-Id: climber.cui@gmail.com wrote: > - the last sentence of the task body, which is a put_line statement > is never executed, but the task terminates. > - also, the per task counter 'rounds', was never incremented, it > stays the same as the initial value. The only procedure increment > 'rounds' is procedure 'use_res', but the procedure was never called > during the execution. If you notice the entry condition for the while > loop, 'while rounds<2 loop', how could it get out of the loop if > 'rounds' was never incremented?? why the program still terminates?? 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. -- Jeff Carter "If I could find a sheriff who so offends the citizens of Rock Ridge that his very appearance would drive them out of town ... but where would I find such a man? Why am I asking you?" Blazing Saddles 37