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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,36da339e8d10520c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-09 04:27:54 PST From: Egil Harald Hoevik Newsgroups: comp.lang.ada Subject: Re: Using 'Access in a limited type declaration as an initialization hook Date: Thu, 09 Aug 2001 10:53:28 +0200 Organization: Kongsberg Group ASA , Norway Message-ID: <3B724F88.23104A8A@kongsberg.com> References: <3B71E616.EEACBB6D@delete_this_anti_spam_part.lmco.com> NNTP-Posting-Host: 150.1.31.67 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.72 [en] (X11; I; SunOS 5.6 sun4u) X-Accept-Language: en Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!uio.no!Norway.EU.net!193.71.169.73!spiten.kongsberg.com!kongsberg!not-for-mail Xref: archiver1.google.com comp.lang.ada:11675 Date: 2001-08-09T10:53:28+02:00 List-Id: "Michael P. Card" wrote: > > An even more interesting and useful issue, is the ability to hook a task to an object in more or less the same way: type Object; task type thread( Self : access Object ); type Object is record t : thread( Object 'access ); seconds : integer := 0; end record; ... task body thread is begin loop Self.seconds := Self.seconds + 1; delay 1.0; end loop; end thread; That way, the task is hooked up to the object, and can access the object's members. ~egilhh -- "What I seek is to serve, with my feeble capacity, truth and justice at the risk of pleasing no-one." Albert Einstein.