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,550291bc2bbf5019 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-17 07:01:10 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!chcgil2-snh1.gtei.net!cambridge1-snf1.gtei.net!news.gtei.net!inmet!not-for-mail From: Tucker Taft Newsgroups: comp.lang.ada Subject: Re: Multiple task bodies for one task type? Date: Mon, 17 Sep 2001 10:01:04 -0400 Organization: AverStar (formerly Intermetrics) Burlington, MA USA Message-ID: <3BA60220.9837BAB6@avercom.net> References: <3BA2A012.1C2A2903@san.rr.com> <3ba5c37f.6210990@news.demon.co.uk> NNTP-Posting-Host: 192.168.24.34 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: inmet2.burl.averstar.com 1000735264 22534 192.168.24.34 (17 Sep 2001 14:01:04 GMT) X-Complaints-To: usenet@inmet2.burl.averstar.com NNTP-Posting-Date: 17 Sep 2001 14:01:04 GMT X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:13120 Date: 2001-09-17T14:01:04+00:00 List-Id: John McCabe wrote: > > On Sat, 15 Sep 2001 00:26:01 GMT, Darren New wrote: > > If I understand yuo correctly, what you want is a heterogeneous array > of tasks. If that is the case, I don't believe it is supported by Ada > as the task type is not extendable. You could define a limited tagged type, and include a task body in each extension. You would need some primitive operations to interface with the entries of the task. An access-to-LT'Class type could be used for passing these around conveniently, where LT is the limited tagged type. > ... > You may be able to implement someting like this using a discriminant > on the task type. You would have to include all possible variations on > the code within a case statement in the task. There may be other ways > of course! The tagged type mechanism is more easily extensible, though the interface to the task must be through primitive operations, rather than directly with entries. > > Hope this helps. -- -Tucker Taft stt@avercom.net http://www.avercom.net Chief Technology Officer, AverCom Corporation (A Titan Company) Bedford, MA USA (AverCom was formerly the Commercial Division of AverStar: http://www.averstar.com/~stt)