comp.lang.ada
 help / color / mirror / Atom feed
From: Sunny <daetalusun@gmail.com>
Subject: Re: How to use a function in a procedure call?
Date: Fri, 30 Sep 2011 20:53:42 -0700 (PDT)
Date: 2011-09-30T20:53:42-07:00	[thread overview]
Message-ID: <8d11e0b0-0f96-444f-a428-52c7f098a11d@q25g2000vbx.googlegroups.com> (raw)
In-Reply-To: j654pf$mhg$1@tornado.tornevall.net

On Oct 1, 3:13 am, Jeffrey Carter <spam.jrcarter....@spam.not.acm.org>
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!



  reply	other threads:[~2011-10-01  3:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-30 10:41 How to use a function in a procedure call? Sunny
2011-09-30 12:16 ` Dmitry A. Kazakov
2011-09-30 19:13 ` Jeffrey Carter
2011-10-01  3:53   ` Sunny [this message]
2011-10-01  5:06     ` Jeffrey Carter
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox