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=-0.9 required=3.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: 'address on a subprogram parameter Date: Tue, 20 Apr 2021 14:25:22 -0500 Organization: JSA Research & Innovation Message-ID: References: <962020bb-97fc-42c3-8255-8f9b2bcbe204n@googlegroups.com> <13f272e5-14a3-45cb-abf2-3d9f5a98f715n@googlegroups.com> Injection-Date: Tue, 20 Apr 2021 19:25:23 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="13175"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:61872 List-Id: "Vincent Marciante" wrote in message news:13f272e5-14a3-45cb-abf2-3d9f5a98f715n@googlegroups.com... On Tuesday, April 20, 2021 at 12:35:07 PM UTC-4, J-P. Rosen wrote: > Le 20/04/2021 à 17:10, Vincent Marciante a écrit : > > I think that I used to know this but currently am not sure: > > > > Assuming the a value is passed by reference, You can only assume that for by-reference types (see RM 6.3(4-9)). Your example just used an unspecified record type. For any old record type (not in that list), the parameter passing mechanism is unspecified. Which means a compiler can pass by copy if it wants (it *probably* will pass by reference, but that's not the same as being required to do so). And if it does, your assumption doesn't hold. For instance, for a small record like: type Screen_Position is X, Y : System.Byte; -- A Janus/Adaism, but I think you get the point. end record; it might make more sense to pass by copy (especially if registers are used in the usual calling convention). Randy.