From: Jean-Pierre Rosen <rosen@adalog.fr>
Subject: Re: Why was it done this way ?
Date: Thu, 27 Oct 2005 08:46:11 +0200
Date: 2005-10-27T08:46:11+02:00 [thread overview]
Message-ID: <i3tpjd.md.ln@hunter.axlog.fr> (raw)
In-Reply-To: <S4X7f.13444$rE2.2101@fe10.lga>
Heimlich Manure a �crit :
> Well, recursion would explain some but not all of it. Something like
>
> task type T1;
> task body T1 is
> MyGhost : T1;
>
> is illegal. Meanwhile,
> [...]
Ah! You got an error message for the above, and you deduced it was
illegal to declare a task of the same type within its own body. Not at
all, it is just a naming issue.
It was felt necessary to be able for a task type to designate itself
(notably, being allowed to abort itself). Therefore there is a
convention that within the body of a task type, the type *name*
designates the currently executing task object (kind of "this" or "self"
if you want), and hence can't be used to declare another object.
But this is just an issue of naming; for example, the following is legal:
task type T1;
subtype Another_Name_For_T1 is T1;
task body T1 is
MyGhost : Another_Name_For_T1;
--
---------------------------------------------------------
J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr
next prev parent reply other threads:[~2005-10-27 6:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-27 1:00 Why was it done this way ? Heimlich Manure
2005-10-27 2:30 ` jimmaureenrogers
2005-10-27 2:39 ` Heimlich Manure
2005-10-27 6:09 ` Jeffrey R. Carter
2005-10-27 6:46 ` Jean-Pierre Rosen [this message]
2005-10-27 2:46 ` Steve
2005-10-27 9:39 ` Georg Bauhaus
2005-10-27 15:07 ` Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox