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: Samuel Tardieu Subject: Re: Uninitialized "out" parameters Date: 1996/07/19 Message-ID: #1/1 X-Deja-AN: 168820660 sender: tardieu@gargantua.enst.fr references: <31EEACDA.64880EEB@sage.inel.gov> <4smh9i$gp5@krusty.irvine.com> to: ica2ph@alpha1.csv.ica.uni-stuttgart.de (Peter Hermann), content-type: text/plain; charset=iso-8859-1 organization: TELECOM Paris mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-07-19T00:00:00+00:00 List-Id: Pascal> In Ada you can read out parameter, and this program is then Pascal> not valid. It's behavior is unknown. Peter> even more frightening Tuck? I don't see what's frightening here. As I understand it, this point has been introduced to allow things like this: procedure Fact (N : in Positive; R : out Positive) is begin R := 1; for I in 2 .. N loop R := R * I; -- Note that the R out parameter gets read here end loop; end Fact; If you forget to initialize R, then it's your fault and the compiler may warn you as it may do for other uninitialized variables... Sam -- "La cervelle des petits enfants, ca doit avoir comme un petit gout de noisette" Charles Baudelaire