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,770f689069566e46 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: protected types and functions in Ada95 (Newbie) Date: 1997/04/24 Message-ID: #1/1 X-Deja-AN: 237034172 References: <335F2DF6.827@und.ida.liu.se> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-04-24T00:00:00+00:00 List-Id: In article <335F2DF6.827@und.ida.liu.se>, Magnus Therning 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