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.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA 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-7-bit Received: by 10.68.50.133 with SMTP id c5mr47524260pbo.2.1317410025935; Fri, 30 Sep 2011 12:13:45 -0700 (PDT) Path: lh7ni8490pbb.0!nntp.google.com!news1.google.com!goblin1!goblin.stu.neva.ru!news.tornevall.net!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: How to use a function in a procedure call? Date: Fri, 30 Sep 2011 12:13:44 -0700 Organization: TornevallNET - http://news.tornevall.net Message-ID: References: <604bf6ae-4050-4d03-be4a-aab907d42162@j10g2000vbb.googlegroups.com> NNTP-Posting-Host: 2c4f34c6201df0d8e87b9fecdf645e46 Mime-Version: 1.0 X-Trace: 5812e3148819e5c189b1120bfbf34c7f X-Complaints-To: abuse@tornevall.net User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15 X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! In-Reply-To: <604bf6ae-4050-4d03-be4a-aab907d42162@j10g2000vbb.googlegroups.com> X-UserIDNumber: 1738 X-Validate-Post: http://news.tornevall.net/validate.php?trace=5812e3148819e5c189b1120bfbf34c7f X-Complaints-Italiano: Non abbiamo padronanza della lingua italiana - se mandate una email scrivete solo in Inglese, grazie X-Posting-User: 0243687135df8c4b260dd4a9a93c79bd Xref: news1.google.com comp.lang.ada:18243 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2011-09-30T12:13:44-07:00 List-Id: 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. -- Jeff Carter "I would never want to belong to any club that would have someone like me for a member." Annie Hall 41