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,803df5f3f60558d5 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Uninitialized "out" parameters Date: 1996/07/21 Message-ID: #1/1 X-Deja-AN: 169310014 references: <31EEACDA.64880EEB@sage.inel.gov> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-07-21T00:00:00+00:00 List-Id: In article , Michel Gauthier wrote: >This problem is harmless here, but can lead to counterintuitive results when >the type implies initialisation (records, controlled types, access types). >Intuitively, the actual parameter should be Finalize'd prior to entering the >subprogram, and re-Initialize'd as part of elaborating the declarative part >of the subprogram ___Is it the behaviour that results from LRM ?___ No. Controlled types are always passed by reference. That is, the formal is a view of the actual (not a copy of it). So no finalization takes place on parameter passing. The original example used an integer. The parameter passing rules are different, depending on what sort of type you have. - Bob