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,be6cbf679aee02c X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!proxad.net!proxad.net!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: Why was it done this way ? Date: Thu, 27 Oct 2005 08:46:11 +0200 Organization: Adalog Message-ID: References: <%DV7f.13378$rE2.2085@fe10.lga> <1130380243.198117.318920@g14g2000cwa.googlegroups.com> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1130396469 12177 195.25.228.57 (27 Oct 2005 07:01:09 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Thu, 27 Oct 2005 07:01:09 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: fr, en In-Reply-To: Xref: g2news1.google.com comp.lang.ada:5981 Date: 2005-10-27T08:46:11+02:00 List-Id: 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