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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d356566c971f9921 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.33.71 with SMTP id p7mr20589424pbi.1.1317441222329; Fri, 30 Sep 2011 20:53:42 -0700 (PDT) Path: lh7ni8756pbb.0!nntp.google.com!news1.google.com!postnews.google.com!q25g2000vbx.googlegroups.com!not-for-mail From: Sunny Newsgroups: comp.lang.ada Subject: Re: How to use a function in a procedure call? Date: Fri, 30 Sep 2011 20:53:42 -0700 (PDT) Organization: http://groups.google.com Message-ID: <8d11e0b0-0f96-444f-a428-52c7f098a11d@q25g2000vbx.googlegroups.com> References: <604bf6ae-4050-4d03-be4a-aab907d42162@j10g2000vbb.googlegroups.com> NNTP-Posting-Host: 116.52.1.99 Mime-Version: 1.0 X-Trace: posting.google.com 1317441222 18579 127.0.0.1 (1 Oct 2011 03:53:42 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 1 Oct 2011 03:53:42 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: q25g2000vbx.googlegroups.com; posting-host=116.52.1.99; posting-account=UzKjIgoAAACYVdD4kFqfNpmC5URfqMDF User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HNKRUAELSC X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.220 Safari/535.1,gzip(gfe) Xref: news1.google.com comp.lang.ada:18255 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2011-09-30T20:53:42-07:00 List-Id: On Oct 1, 3:13=A0am, Jeffrey Carter wrote: > On 09/30/2011 03:41 AM, Sunny wrote: > > > Hi all! > > I want so set a icon to my frame. Use GtkAda. But when I use the > > Set_Icon_From_File(win,"icon.jpg"); > > An Error said that "can not use function 'Set_Icon_From_File' in a > > procedure call" > > As the msg indicates, Set_Icon_From_File is a function, not a procedure. = While > some languages allow you to silently discard a function result, Ada does = not. So > you must do something with the result of the function call, such as store= it in > a variable, pass it to another subprogram, or use it in an expression. > Thanks for your reply. Could you indicate a specified way to solve the problem? Such as how to store-it in a variable, pass it to another subprogram, or use it in an expression? Thank you again!