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,FREEMAIL_FROM, 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: johnherro@aol.com (John Herro) Subject: Re: Uninitialized "out" parameters Date: 1996/07/19 Message-ID: <4som64$775@newsbf02.news.aol.com>#1/1 X-Deja-AN: 169643780 sender: root@newsbf02.news.aol.com references: organization: America Online, Inc. (1-800-827-6364) newsgroups: comp.lang.ada Date: 1996-07-19T00:00:00+00:00 List-Id: Samuel Tardieu writes that Ada 95 allows reading of "out" parameters to allow things like: > 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; Yes, but this saves us only one variable declaration and one line in the executable region over the way it would be done in Ada 83: procedure Fact (N : in Positive; R : out Positive) is S : Positive; -- new begin S := 1; for I in 2 .. N loop S := S * I; end loop; R := S; -- new end Fact; - John Herro Software Innovations Technology http://members.aol.com/AdaTutor ftp://members.aol.com/AdaTutor