comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Compiler error: 'Expect procedure name in procedure call'
Date: Wed, 6 Nov 2002 17:29:04 -0600
Date: 2002-11-06T17:29:04-06:00	[thread overview]
Message-ID: <usj9b2pdgae78@corp.supernews.com> (raw)
In-Reply-To: 445cd6bf.0211050129.3afa4d54@posting.google.com

Jon wrote in message
<445cd6bf.0211050129.3afa4d54@posting.google.com>...
>Vinzent Hoefler <JeLlyFish.software@gmx.net> wrote in message
news:<3dc6e966_1@news.bluewin.ch>...
>> j_del_strother@hotmail.com (Jon) wrote:
>>
>> >Which leads on to my next question...
>> >Can you call a function & ignore its return value?  I'm using a lot
of
>> >Win32 calls, all of which are written as functions rather than
>> >procedures, and I'm getting a huge mess of useless temporary
variables
>> >just to allow me to call the functions.
>>
>> Are you *sure*, you won't have to check the function result?
>
>In some cases, absolutely.  For example, flipping a bitmap to the DC
>will return the old bitmap that was originally stored there.  I then
>have to create a useless temporary variable for it...
>
>> Perhaps you could use a declare block around the "function" call with
>> a local variable to store the result. The optimizer should be easily
>> able to remove this reference.
>>
>
>Sure, but it gets very messy when you're calling several dozen C
>functions.


If you're doing any significant amount of GUI programming, you are much
better off not calling Win32 at all. Especially because the return codes
are inconsistent (and don't always match the documentation, either.) Use
one of the thick bindings like Claw (www.rrsoftware.com), or even
something platform independent like GtkAda. In the case of bitmap
manipulations, Claw has all of that support built-in and tested. Why
re-invent the wheel??

             Randy.






  parent reply	other threads:[~2002-11-06 23:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-04 15:05 Compiler error: 'Expect procedure name in procedure call' Jon
2002-11-04 15:35 ` Stephen Leake
2002-11-04 19:57   ` Jon
2002-11-04 20:35     ` Björn Lundin
2002-11-04 20:53       ` Björn Lundin
2002-11-04 20:48     ` Jim Rogers
2002-11-04 21:08       ` Stephen Leake
2002-11-05 22:15         ` Frank J. Lhota
2002-11-05 20:51       ` Programmer Dude
2002-11-06 15:06         ` Ted Dennison
2002-11-04 21:40     ` Vinzent Hoefler
2002-11-05  9:29       ` Jon
2002-11-05  9:55         ` Dale Stanbrough
2002-11-06 23:29         ` Randy Brukardt [this message]
2002-11-05 14:22     ` Ted Dennison
replies disabled

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