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,2c7667d500b3afdc,start X-Google-Attributes: gid103376,public From: "Chris Sparks (Mr. Ada)" Subject: Puzzling question Date: 1997/05/08 Message-ID: <337209D7.4D25@aisf.com>#1/1 X-Deja-AN: 240300147 Sender: Ada programming language Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU Organization: McDonnell Douglas Newsgroups: comp.lang.ada Date: 1997-05-08T00:00:00+00:00 List-Id: Hi all, I have the following files: ---------------------------------------------------------------------- package T is type Rec_Type is record A : Integer; B : Integer; end record; procedure S (U : out Rec_Type); end T; ---------------------------------------------------------------------- with System; package body T is procedure R (V : in System.Address) is begin null; end R; procedure S (U : out Rec_Type) is begin U.A := 1; U.B := 2; R (V => U.A'Address); -- Why is this valid???????????????? end S; end T; ---------------------------------------------------------------------- with T; use T; procedure T1 is M : Rec_Type; begin T.S (U => M); end; ---------------------------------------------------------------------- At work we are using Ada 83 and I thought that if a parameter is "out" in a procedure then only assignments could be made to the variable. In the call to R above, U.A would effectively be considered an input which I thought would be illegal since U is an "out" type. I know that in Ada 95 this is ok, however, I don't know why this works under Ada 83. Any help will be appreciated. Chris Sparks