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,7769c087a4d30c0e X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Thu, 07 Jul 2005 16:28:43 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <1120751455.846822.141050@z14g2000cwz.googlegroups.com> <1xuh1gs97pwwg$.1v4w9ruw1n2x$.dlg@40tude.net> Subject: Re: Unchecked_Conversion and task pointer. Date: Thu, 7 Jul 2005 16:31:51 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4952.2800 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4952.2800 Message-ID: <1PidncjOa5cWA1DfRVn-1Q@megapath.net> NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-L3IO9FsYishcK5fZ+fRSg08hVQ8KefcrjuYE7nhuehxN60EDb4jGmA6WckoWTWpHwR5aTSzAflrdmU4!ZqmQIZeua7tw9eSRcgzmwYocdvJ6kD5HwIpnJ01n0MIVUV4tSR+rieXtAzis6oCZNv0xjV13TcA9 X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.31 Xref: g2news1.google.com comp.lang.ada:11950 Date: 2005-07-07T16:31:51-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:1xuh1gs97pwwg$.1v4w9ruw1n2x$.dlg@40tude.net... ... > Task types are not tagged in Ada (alas). Task types that inherit from an interface are tagged in Ada 200Y. > So if you are trying to have a > kind of task types hierarchy you should use mix-in. No, you should definitely use an interface. Other than that you may not be able to find a compiler that supports them yet. Note that you can't derive from a task type; those have to be leaves in the hierarchy. package Persons is type Root_Person is interface; procedure Who_an_I (Person : in Root_Person); type Access_Person is access Root_Person'Class; end Persons; task type Cain and Persons.Root_Person is entry Who_Are_You; end Cain; task type Abel and Persons.Root_Person is entry Who_Are_You; end Abel; -- The bodies of the tasks remain the same. Someone : Access_Person := Abel'Access; Someone.Who_am_I; -- Dispatch to the appropriate entry. Who_am_I (Someone.all); -- The same call in "normal" notation. Randy;