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,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9625801f07d834,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-06 13:53:20 PST Path: supernews.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!hermes2.visi.com!news-out.visi.com!news-out.visi.com!hermes.visi.com!pulsar.dimensional.com!dimensional.com!coop.net!newsfeed1.global.lmco.com!svlnews.lmms.lmco.com!not-for-mail From: "Smark" Newsgroups: comp.lang.ada Subject: Default expression only allowed for "in" parameters - why? Date: Fri, 6 Apr 2001 15:41:52 -0500 Organization: Lockheed Martin Corporation Message-ID: <9al9mc$jgk2@cui1.lmms.lmco.com> NNTP-Posting-Host: 138.209.253.101 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Xref: supernews.google.com comp.lang.ada:6589 Date: 2001-04-06T15:41:52-05:00 List-Id: LRM 6.1(19): A default_expression is only allowed in a parameter_specification for a formal parameter of mode in. I recently had a situation in which it was desirable for me to have a default value for an "out" parameter of a function. It was something like: procedure Do_Something (Data : in Some_Type; Status : out Status_Type); Normally, Status = Ok. It seemed to me that, rather than setting Status := Ok at the beginning of my procedure, it would make sense to just set the default value in the procedure spec. That is: 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? TIA, Mark