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=-0.1 required=5.0 tests=AXB_XMAILER_MIMEOLE_OL_024C2, BAYES_00,MAILING_LIST_MULTI,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,CP1252 X-Google-Thread: 103376,9245b8db9abd376c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-14 12:46:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news.maxwell.syr.edu!deine.net!freenix!enst!enst.fr!not-for-mail From: "David C. Hoos, Sr." Newsgroups: comp.lang.ada Subject: Re: Out parameters in a function Date: Sun, 14 Apr 2002 14:45:50 -0500 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8bit X-Trace: avanie.enst.fr 1018813562 13168 137.194.161.2 (14 Apr 2002 19:46:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Sun, 14 Apr 2002 19:46:02 +0000 (UTC) Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.8 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Original-Cc: darkelf@aim.homelinux.com Xref: archiver1.google.com comp.lang.ada:22524 Date: 2002-04-14T14:45:50-05:00 You need to say C.all := anything; (assuming "anything" is a character expression); ----- Original Message ----- From: "Nazgul" Newsgroups: comp.lang.ada To: Sent: April 14, 2002 1:29 PM Subject: Out parameters in a function > Hi, I need to use an output parameter in an Ada function, something like > > function ReadChar(f: File; c: out character) return boolean; > > The function must return a boolean, so the only way to read the character is > via the 'c' parameter. In other context, I use > > function (something: tpSomething) return ...; where tpSomething is an access > to a record type, and I can modify the contents of the record in the > function, but if I use > > function ReadChar(f: File; c: access character) return boolean; > > the compiler gives an error when i do something like > > c:=anything; > > Is there any way of using c as an output parameter? > > Thanks. > > -- > > (:==================:) > �lvaro Iradier > airadier@able.es > (+34)660133259 > (:==================:) > > > _______________________________________________ > comp.lang.ada mailing list > comp.lang.ada@ada.eu.org > http://ada.eu.org/mailman/listinfo/comp.lang.ada > >