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-Thread: 103376,487310d7e1471eac X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!y42g2000hsy.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: parent package referring to child Date: Thu, 11 Oct 2007 08:21:34 -0700 Organization: http://groups.google.com Message-ID: <1192116094.154553.198460@y42g2000hsy.googlegroups.com> References: <1191997397.865251.322480@d55g2000hsg.googlegroups.com> <1192028394.287114.182670@o3g2000hsb.googlegroups.com> <1192042440.388079.69040@o80g2000hse.googlegroups.com> <1192044748.953712.248880@v3g2000hsg.googlegroups.com> <1192047607.865747.220890@50g2000hsm.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1192116094 29849 127.0.0.1 (11 Oct 2007 15:21:34 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 11 Oct 2007 15:21:34 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: y42g2000hsy.googlegroups.com; posting-host=66.126.103.122; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news2.google.com comp.lang.ada:2430 Date: 2007-10-11T08:21:34-07:00 List-Id: On Oct 10, 9:12 pm, "Randy Brukardt" wrote: > "Adam Beneschan" wrote in message > > news:1192047607.865747.220890@50g2000hsm.googlegroups.com... > > > On Oct 10, 12:32 pm, Matthew Heaney wrote: > ... > > > No, that's wrong. In this case you can use mode inout because type T > > > is tagged (meaning that it's passed by reference). > > > I don't see what the parameter mode has to do with it. > > The mode has nothing do to with it; but the rule is that a tagged incomplete > type (which is what you get in a limited view) can be used as a parameter. > See 3.101(8.2/2). > > > I can't find a rule that would make "procedure Op (O : in P.C.T);" > > illegal. > > It's the absence of a rule: see the only allowed uses for incomplete types: > see 3.10.1(5-9.4/2). Note that 3.10.1(9.4/2) says that no other uses are > allowed. Use as a parameter is not allowed for untagged types. Right... I was under the impression that we were assuming T was tagged. > > Also, the "by reference" comment isn't relevant either. > > It is relevant as it is the reason that tagged incomplete types can be used > as parameters (because the compiler doesn't need to know the real type in > order to know how it is passed as a parameter - this same property is needed > to be able to deal with classwide types which is why it is fundamental to > tagged types); you don't know that for untagged types so they aren't > allowed. Yep, that makes sense. My point was that using a parameter is illegal for untagged by-reference types, just as for untagged by-copy types. But if you're looking at a limited view, you aren't allowed to know enough about the type to know whether an untagged type is by-reference or by-copy. I missed that---thanks for the explanation. -- Adam