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,9245b8db9abd376c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-15 09:34:45 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Out parameters in a function Date: 15 Apr 2002 12:24:46 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1018888265 29657 128.183.220.71 (15 Apr 2002 16:31:05 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 15 Apr 2002 16:31:05 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:22563 Date: 2002-04-15T16:31:05+00:00 List-Id: "Nazgul" writes: > Hi, I need to use an output parameter in an Ada function, something like > > function ReadChar(f: File; c: out character) return boolean; > Why do you "need" to do this? If you are writing your own Ada subprogram, just declare two 'out' parameters, one character and one boolean. If you are trying to import a C function that has this profile, you need to use the non-standard GNAT pragma Import_Valued_Procedure; see the GNAT user's guide. -- -- Stephe