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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9625801f07d834 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-06 14:50:19 PST Newsgroups: comp.lang.ada Path: supernews.google.com!sn-xit-02!sn-xit-04!supernews.com!newsfeed.mesh.ad.jp!uunet!osa.uu.net!sac.uu.net!ash.uu.net!world!bobduff From: Robert A Duff Subject: Re: Default expression only allowed for "in" parameters - why? Sender: bobduff@world.std.com (Robert A Duff) Message-ID: Date: Fri, 6 Apr 2001 21:49:16 GMT References: <9al9mc$jgk2@cui1.lmms.lmco.com> Organization: The World Public Access UNIX, Brookline, MA X-Newsreader: Gnus v5.3/Emacs 19.34 Xref: supernews.google.com comp.lang.ada:6594 Date: 2001-04-06T21:49:16+00:00 List-Id: "Smark" writes: > procedure Do_Something (Data : in Some_Type; > Status : out Status_Type := Ok); > > It also seemed like a strange idea, because I never recalled seeing > it done. Sure enough, it is prohibited by the LRM. What is the > rationale for this? If defaults were allowed for 'out' params, I would think it ought to mean that this is the default variable to pass to the parameter, not a default initial value for it. In Ada, a default applies if the parameter is not explicitly given at the call site. Are you saying that Status should be initialized to OK if the actual parameter is specified? Defaults for 'out' params were allowed in Green. I don't know why they were removed. Perhaps the fact the you and I disagree on what they ought to mean is a hint. - Bob