From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,MSGID_SHORT autolearn=no autolearn_force=no version=3.4.5-pre1 Date: 19 Jul 91 14:30:27 GMT From: mcsun!corton!enst!cyclope!rosen@uunet.uu.net (Jean Pierre Rosen) Subject: Re: Task Access Type Variables Message-ID: <166@cyclope.enst.fr> List-Id: In article <9107181212.aa26405@PARIS.ICS.UCI.EDU>, jduarte@liege.ICS.UCI.EDU (J o s e D u a r t e) writes: > > Here's a question: > > What happens to the value of a variable which > is an access to a task (type) once the task completes > its job or terminates for some reason? > ... Since the LRM says nothing special, the answer is plain: nothing special happens! You can use it to ask for the status of the task (T'terminated will be true) or even call entries (which will raise TASKING_ERROR, of course). If you UNCHECK_DEALLOCATE it, you might deallocate the task's descriptor space (not sure any compiler does it). Don't be confused with the reverse statement: if you deallocate a pointer to task before it is terminated, the task is NOT affected. This may be the place for an interesting remark about access variables in general. A plain variable is a name that designates always the same object. It is a kind of "constant" variable. An access variable is simply a name that can designate different objects over time, a kind of "variable" variable. Both behave basically the same. That's why you can write T(I), whether T is an array or an access to an array. An Ada access is by no mean an address!!