comp.lang.ada
 help / color / mirror / Atom feed
From: kst@king.cts.com (Keith Thompson)
Subject: Re: Depending on passing mechanism
Date: 1997/10/21
Date: 1997-10-21T00:00:00+00:00	[thread overview]
Message-ID: <877459573.453425@wagasa.cts.com> (raw)
In-Reply-To: dewar.876842858@merv


Robert I. Eachus (eachus@spectre.mitre.org) wrote:
>  Ada 95 RM 6.2(4..10):
> 
>     "A type is a _by-reference_ type if it is a descendent of one of
> the following:
> 
>      ...
>      a nonprivate type with the reserved word limited in its declaration;
>      
>      a composite type with a subcomponent of a by-reference type;
> 
>      a private type whoes full type is a by-reference type;
> 
>      A parameter of a by-reference type is passed by reference..."
> 
>      To everyone other than Henry Baker this says that there is no
> problem of copy-in copy-out semantics in Ada 95 for limited private
> types since it isn't allowed.

Not quite, I'm afraid.  For example, type Foo in the following is
not a by-reference type:

   ...
      type Foo is limited private;
   private
      type Foo is
	 record
	    X : Integer;
	 end record;
   ...

To make it by-reference, you'd have to add the word "limited" to the
full type declaration.

This problem is acknowledged in AARM-6.2(10.g):

   We say "by-reference" above because these statements are not always
   true for limited private types whose underlying type is nonlimited
   (unfortunately).

-- 
Keith Thompson (The_Other_Keith) kst@cts.com <*>
^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H
San Diego, California, USA
"Simba, you have forgotten me.  I am your father.  This is CNN." -- JEJ




  parent reply	other threads:[~1997-10-21  0:00 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-13  0:00 Depending on passing mechanism Andre Spiegel
1997-10-13  0:00 ` Matthew Heaney
1997-10-14  0:00 ` Robert Dewar
1997-10-14  0:00   ` Henry Baker
1997-10-15  0:00     ` JP Thornley
1997-10-15  0:00     ` Geert Bosch
1997-10-15  0:00       ` Robert Dewar
1997-10-15  0:00         ` Brian Rogoff
1997-10-19  0:00           ` Robert Dewar
1997-10-22  0:00             ` Henry Baker
1997-10-15  0:00         ` Robert Dewar
1997-10-17  0:00           ` Andre Spiegel
1997-10-17  0:00             ` Henry Baker
1997-10-17  0:00               ` Robert I. Eachus
1997-10-17  0:00               ` Jon S Anthony
1997-10-21  0:00               ` Robert A Duff
1997-10-21  0:00                 ` Peter Hermann
1997-10-22  0:00                   ` Robert A Duff
1997-10-22  0:00                     ` Brian Rogoff
1997-10-22  0:00                 ` Henry Baker
1997-10-21  0:00                   ` Robert Dewar
1997-10-22  0:00                   ` Brian Rogoff
1997-10-22  0:00                   ` Jon S Anthony
1997-10-15  0:00       ` Henry Baker
1997-10-15  0:00         ` Jon S Anthony
1997-10-15  0:00         ` Robert Dewar
1997-10-16  0:00         ` Brian Rogoff
1997-10-17  0:00           ` Henry Baker
1997-10-18  0:00             ` Fergus Henderson
1997-10-18  0:00             ` Brian Rogoff
1997-10-18  0:00               ` Matthew Heaney
1997-10-19  0:00                 ` Brian Rogoff
1997-10-21  0:00                   ` Robert A Duff
1997-10-22  0:00                     ` Robert Dewar
1997-10-22  0:00                       ` Brian Rogoff
     [not found]                         ` <dewar.877601826@merv>
1997-10-23  0:00                           ` Brian Rogoff
1997-10-23  0:00                       ` Henry Baker
1997-10-23  0:00                     ` Brian Rogoff
1997-10-19  0:00               ` Fergus Henderson
1997-10-19  0:00                 ` Brian Rogoff
1997-10-20  0:00                   ` Fergus Henderson
1997-10-20  0:00                 ` Henry Baker
1997-10-20  0:00                   ` Tucker Taft
1997-10-21  0:00                     ` Geert Bosch
1997-10-21  0:00     ` Robert A Duff
1997-10-22  0:00       ` Henry Baker
1997-10-21  0:00         ` Matthew Heaney
1997-10-22  0:00           ` Simon Wright
1997-10-23  0:00           ` Henry Baker
1997-10-23  0:00             ` Pat Rogers
1997-10-24  0:00             ` Robert Dewar
1997-10-23  0:00         ` Robert A Duff
1997-10-21  0:00   ` Keith Thompson [this message]
1997-10-14  0:00 ` Robert Dewar
replies disabled

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