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,573be8c453ecbff4 X-Google-Attributes: gid103376,public From: Stephen Leake Subject: Re: 'Read for pointers Date: 2000/07/31 Message-ID: #1/1 X-Deja-AN: 652832986 References: <8lndgv$1om$1@nnrp1.deja.com> Content-Type: text/plain; charset=us-ascii X-Complaints-To: dscoggin@cne-odin.gsfc.nasa.gov X-Trace: skates.gsfc.nasa.gov 965059949 20081 128.183.220.71 (31 Jul 2000 16:12:29 GMT) Organization: NASA Goddard Space Flight Center Mime-Version: 1.0 User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.5 NNTP-Posting-Date: 31 Jul 2000 16:12:29 GMT Newsgroups: comp.lang.ada Date: 2000-07-31T16:12:29+00:00 List-Id: "Pat Rogers" writes: > "Stephen Leake" wrote in message > news:uaef1lxlw.fsf@gsfc.nasa.gov... > > Suppose the user writes: > > > > My_Handle : Handle; > > > > (somehow, My_Handle is given some value) > > > > Read (Stream, My_Handle); > > > > The value of My_Handle is _not_ copied to Item at the procedure > call. > > That only happens for "in" or "in out" parameters, not "out" > > parameters. > > Have a look at RM 6.4.1{12,13} for a surprise. I stand corrected. I guess the Ada designers were trying to prevent garbage pointers. I think I'd prefer the standard "initialized to null" behavior here, for consistency. I guess it's easy enough to remember that "out" is the same as "in out" for access types, and composite types with discriminants. On further thought, I can't think of a time when this behavior is actively bad; it's just not what I thought the rules were. -- -- Stephe