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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e926b2112e1c83d7 X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: Re: [Q] Task Types Date: 1998/06/09 Message-ID: #1/1 X-Deja-AN: 361050367 References: <6lj3t7$dpd@gcsin3.geccs.gecm.com> Organization: Network Intensive Newsgroups: comp.lang.ada Date: 1998-06-09T00:00:00+00:00 List-Id: John McCabe writes: > Is there a means of providing an incomplete declaration of a Task type? The following code compiles cleanly using gnat v3.09. procedure Test_Task is type T; type TA is access T; task type T is entry E (O : TA); end T; task body T is begin accept E (O : TA); end T; begin null; end Test_Task; You'd often use access discriminants for this sort of thing: type RT; task type TT (RO : access RT) is entry E; end TT; type RT is limited record TO : TT (RT'Access); I : Integer; end record; task body TT is begin accept E do end E; ... RO.I ... end TT; Access discriminants give task type TT access to all the components in the record.