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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,64a6ad02ec510120 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-03 10:55:00 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!207.217.77.102!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail From: "Eric G. Miller" Subject: Re: Interfacing to C library... User-Agent: Pan/0.13.1 (It's always funny until somebody immanentizes the eschaton (Debian GNU/Linux)) Message-ID: Newsgroups: comp.lang.ada References: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: Sun, 03 Nov 2002 18:55:08 GMT NNTP-Posting-Host: 216.119.15.188 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 1036349708 216.119.15.188 (Sun, 03 Nov 2002 10:55:08 PST) NNTP-Posting-Date: Sun, 03 Nov 2002 10:55:08 PST Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:30322 Date: 2002-11-03T18:55:08+00:00 List-Id: In , Robert A Duff wrote: > "Eric G. Miller" writes: >> Aha! I missed that you couldn't mix "in/out" w/ "access" in a subprogram >> parameter list declaration/definition. Okay, definitely nicer than defining >> 40 access to record types... > > You *can* mix 'in out' with 'access': > > procedure P(X: in out R; Y: access R); > > is legal. Perhaps what you're thinking of is the fact that functions do > not allow 'in out' parameters, so sometimes people use access parameters > instead, when they want a function to have side effects on its > parameters. C functions do that all the time -- e.g., you pass a > "char *", and the function writes upon the thing pointed-to, and *also* > returns some sort of status code. I was thinking of 6.1.15 parameter_specification ::= defining_identifier_list : mode subtype_mark [:= default_expression] | defining_identifier_list : access_definition [:= default_expression] procedure Foo (Thing : in out access Bar); But, I suppose that doesn't make any sense... Anyway, thanks for the help...