From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:ad4:4e45:: with SMTP id eb5mr2448605qvb.12.1619085283143; Thu, 22 Apr 2021 02:54:43 -0700 (PDT) X-Received: by 2002:a25:1883:: with SMTP id 125mr3351406yby.465.1619085282868; Thu, 22 Apr 2021 02:54:42 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!news.szaf.org!3.eu.feeder.erje.net!feeder.erje.net!fdn.fr!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 22 Apr 2021 02:54:42 -0700 (PDT) In-Reply-To: <44f2a351-0b1c-4779-b1ac-5509ef51585an@googlegroups.com> Injection-Info: google-groups.googlegroups.com; posting-host=35.245.252.196; posting-account=XfA3zgkAAABoz6fRf3Tehtnqqr7Ycml- NNTP-Posting-Host: 35.245.252.196 References: <962020bb-97fc-42c3-8255-8f9b2bcbe204n@googlegroups.com> <13f272e5-14a3-45cb-abf2-3d9f5a98f715n@googlegroups.com> <44f2a351-0b1c-4779-b1ac-5509ef51585an@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <2e6e9404-b7c3-4c38-a17b-ec18662bca9cn@googlegroups.com> Subject: Re: 'address on a subprogram parameter From: Vincent Marciante Injection-Date: Thu, 22 Apr 2021 09:54:43 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:61895 List-Id: On Wednesday, April 21, 2021 at 4:17:43 PM UTC-4, Shark8 wrote: > On Tuesday, April 20, 2021 at 11:18:24 AM UTC-6, Vincent Marciante wrote: > > I actually do not want to test that: I just wrote that as an attempt to > > make explicit want I was asking and what I did not expect (exception). > > I am really working with old code where I am moving some logic out > > from within a package body that contains the "address'd" variable to > > an unassociated package that defines the "Big_Record" type and I > > wanted to be sure that passing it as a parameter would (always) have > > the same behavior with the variable being passed as a parameter. > Why not use genreics? > > Generic > Object : in out Big_Record; > Procedure Do_Something; > > Remember, also, that you can supply subprograms in the formal parameters. Using a method that ensure that the parameter will be passed by reference is all that I need. Generics would just add one extra step - the instantiation.