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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ec570d1a83fda83c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-25 18:47:37 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!news1.sttls1.wa.home.com.POSTED!not-for-mail From: "DuckE" Newsgroups: comp.lang.ada References: <3b5e887e.10671695@news.bt.es> Subject: Re: Problem with tasks X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Thu, 26 Jul 2001 01:47:36 GMT NNTP-Posting-Host: 24.248.45.203 X-Complaints-To: abuse@home.net X-Trace: news1.sttls1.wa.home.com 996112056 24.248.45.203 (Wed, 25 Jul 2001 18:47:36 PDT) NNTP-Posting-Date: Wed, 25 Jul 2001 18:47:36 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:10579 Date: 2001-07-26T01:47:36+00:00 List-Id: If you move the code that creates the task outside of the task body (into a function or procedure) things appear to work fine. task type cell; type cell is access cell; procedure create_cell is anon : acell; begin anon := new cell; end create_cell; task body cell is begin create_cell; end cell; SteveD "Carlos Aganzo" wrote in message news:3b5e887e.10671695@news.bt.es... > I need to create a new instance of the same task from itself, > something like > > type acell is access cell; > > task body cell is > anon: acell; > begin > anon := new cell; > -- more code > end cell; > > > How could I do this? > > Is there any way to create anonymous tasks instances, Java-like? > > Thanks in advance. > > Carlos. >