comp.lang.ada
 help / color / mirror / Atom feed
From: "Eric G. Miller" <egm2@jps-nospam.net>
Subject: Re: Interfacing to C library...
Date: Sun, 03 Nov 2002 18:55:08 GMT
Date: 2002-11-03T18:55:08+00:00	[thread overview]
Message-ID: <pan.2002.11.03.18.58.26.54768@jps-nospam.net> (raw)
In-Reply-To: wccpttm1txo.fsf@shell01.TheWorld.com

In <wccpttm1txo.fsf@shell01.TheWorld.com>, Robert A Duff wrote:

> "Eric G. Miller" <egm2@jps-nospam.net> 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...




  reply	other threads:[~2002-11-03 18:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-01 15:38 Interfacing to C library Eric G. Miller
2002-11-01 17:11 ` Robert A Duff
2002-11-01 17:40   ` tmoran
2002-11-02  5:10     ` Eric G. Miller
2002-11-02  6:02       ` tmoran
2002-11-02 16:10       ` Robert A Duff
2002-11-02 18:35         ` Eric G. Miller
2002-11-02 18:55           ` Robert A Duff
2002-11-02 23:59             ` Eric G. Miller
2002-11-03 16:47               ` Robert A Duff
2002-11-03 18:55                 ` Eric G. Miller [this message]
2002-11-03  9:28             ` Dale Stanbrough
replies disabled

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