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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5c8024b730bb1bfb X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-06 15:27:58 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!crtntx1-snh1.gtei.net!cambridge1-snf1.gtei.net!news.gtei.net!bos-service1.ext.raytheon.com!cyclone.swbell.net!cyclone-sf.pbi.net!216.218.192.242!news.he.net!news-out.spamkiller.net!propagator2-maxim!news-in.spamkiller.net!telocity-west!TELOCITY!sn-xit-03!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Compiler error: 'Expect procedure name in procedure call' Date: Wed, 6 Nov 2002 17:29:04 -0600 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <445cd6bf.0211040705.3b638858@posting.google.com> <445cd6bf.0211041157.1537dfd5@posting.google.com> <3dc6e966_1@news.bluewin.ch> <445cd6bf.0211050129.3afa4d54@posting.google.com> X-Newsreader: Microsoft Outlook Express 4.72.3612.1700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3719.2500 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:30488 Date: 2002-11-06T17:29:04-06:00 List-Id: Jon wrote in message <445cd6bf.0211050129.3afa4d54@posting.google.com>... >Vinzent Hoefler 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.