comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: protected types and functions in Ada95 (Newbie)
Date: 1997/04/24
Date: 1997-04-24T00:00:00+00:00	[thread overview]
Message-ID: <E957px.9qG@world.std.com> (raw)
In-Reply-To: 335F2DF6.827@und.ida.liu.se



In article <335F2DF6.827@und.ida.liu.se>,
Magnus Therning  <d94magth@und.ida.liu.se> wrote:
>I want to seize a semaphore in a function. Is that possible using the
>following protected type semaphore? Functions can only take 'in'
>parameters, but I need 'in out' since Seize changes the semaphore.

You will, no doubt, get flamed by the anti-side-effect police.  ;-)

It's annoying that functions don't take 'in out' parameters.
The best workaround is probably to use an access parameter.
Then declare your objects aliased, and pass 'Access of them.

- Bob




  reply	other threads:[~1997-04-24  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-04-24  0:00 protected types and functions in Ada95 (Newbie) Magnus Therning
1997-04-24  0:00 ` Robert A Duff [this message]
1997-04-25  0:00   ` Robert Dewar
1997-04-24  0:00 ` Jon S Anthony
replies disabled

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