comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@world.std.com>
Subject: Re: Protected Objects: Scoping problem.
Date: 1998/06/17
Date: 1998-06-17T00:00:00+00:00	[thread overview]
Message-ID: <wccaf7bpwam.fsf@world.std.com> (raw)
In-Reply-To: uemwnzzlr.fsf@gsfc.nasa.gov


Stephen Leake <Stephen.Leake@gsfc.nasa.gov> writes:

> package Protected_Variable is
>    
>    type T is new integer;
>    
>    protected Variable is
>       function Read return T;
> 
>    private
>       procedure Write(Value: T);  -- NOT accessible to outside packages

True, but I think the original poster wanted Write to be accessible to
*this* package (in the body), but not accessible to outside packages.
The above doesn't do that.

Another post showed how to wrap the call to the protected Read in a
normal procedure, and put the whole protected type in the package body.
That works, but if the exported thing was an entry, then it wouldn't --
outsiders wouldn't be able to do entry-ish things to it, such as requeue
to it, do a timed call to it, &c.

-- 
Change robert to bob to get my real email address.  Sorry.
-- 
Change robert to bob to get my real email address.  Sorry.




      reply	other threads:[~1998-06-17  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-15  0:00 Protected Objects: Scoping problem Robert Worne
1998-06-15  0:00 ` Matthew Heaney
1998-06-17  0:00 ` Stephen Leake
1998-06-17  0:00   ` Robert A Duff [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox