From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.acm.org>
Subject: Re: Very confused by Ada tasking, can not explain the execution outcome.
Date: Sat, 30 Aug 2008 05:12:59 GMT
Date: 2008-08-30T05:12:59+00:00 [thread overview]
Message-ID: <vF4uk.319979$yE1.172720@attbi_s21> (raw)
In-Reply-To: <a5408e90-8113-4a35-bc1f-81f2613d6616@73g2000hsx.googlegroups.com>
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
next prev parent reply other threads:[~2008-08-30 5:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-30 1:54 Very confused by Ada tasking, can not explain the execution outcome climber.cui
2008-08-30 4:17 ` jimmaureenrogers
2008-08-30 9:34 ` climber.cui
2008-08-30 10:59 ` Damien Carbonne
2008-08-31 13:37 ` Stephen Leake
2008-08-30 5:12 ` Jeffrey R. Carter [this message]
2008-08-30 9:42 ` climber.cui
2008-08-30 13:40 ` Georg Bauhaus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox