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,29fe9a340e0d180d X-Google-Attributes: gid103376,public From: kst@king.cts.com (Keith Thompson) Subject: Re: Depending on passing mechanism Date: 1997/10/21 Message-ID: <877459573.453425@wagasa.cts.com>#1/1 X-Deja-AN: 282257752 Cache-Post-Path: wagasa.cts.com!kst@king.cts.com References: Organization: CTS Network Services Newsgroups: comp.lang.ada Date: 1997-10-21T00:00:00+00:00 List-Id: 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