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=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,5c8024b730bb1bfb X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-04 12:51:37 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed1.swip.net!swipnet!nntpserver.swip.net!not-for-mail From: =?ISO-8859-1?Q?Bj=F6rn?= Lundin Subject: Re: Compiler error: 'Expect procedure name in procedure call' Newsgroups: comp.lang.ada References: <445cd6bf.0211040705.3b638858@posting.google.com> <445cd6bf.0211041157.1537dfd5@posting.google.com> <7QAx9.465$0d2.1142@nntpserver.swip.net> User-Agent: KNode/0.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8Bit Message-ID: NNTP-Posting-Host: 213.101.76.12 X-Complaints-To: news-abuse@swip.net X-Trace: nntpserver.swip.net 1036443084 213.101.76.12 (Mon, 04 Nov 2002 21:51:24 MET DST) NNTP-Posting-Date: Mon, 04 Nov 2002 21:51:24 MET DST Organization: A Customer of Tele2 X-Sender: x-367446@d213-101-76-12.swipnet.se Date: Mon, 04 Nov 2002 21:53:21 +0100 Xref: archiver1.google.com comp.lang.ada:30363 Date: 2002-11-04T21:53:21+01:00 List-Id: Bj�rn Lundin wrote: > Jon wrote: > >> Stephen Leake wrote in message >> news:... >>> j_del_strother@hotmail.com (Jon) writes: > >> 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. > > Import them as procedures instead :) > > pragma Import(C, My_Ada_Procedure, My_C_Function); > > in gnat you could use a pragma called something like > Import_Valued_Procedure > > /Bj�rn Should have added that return values are there for a reason, it's not a good idea to ignore the result... /Bj�rn