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-04 12:48:32 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.news.rcn.net!rcn!wn11feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!not-for-mail Message-ID: <3DC6DCC4.60301@worldnet.att.net> From: Jim Rogers User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Compiler error: 'Expect procedure name in procedure call' References: <445cd6bf.0211040705.3b638858@posting.google.com> <445cd6bf.0211041157.1537dfd5@posting.google.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 04 Nov 2002 20:48:32 GMT NNTP-Posting-Host: 12.86.34.64 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1036442912 12.86.34.64 (Mon, 04 Nov 2002 20:48:32 GMT) NNTP-Posting-Date: Mon, 04 Nov 2002 20:48:32 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:30361 Date: 2002-11-04T20:48:32+00:00 List-Id: 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. > Ada does not allow you to ignore return values. Ignoring return values is a common (but harmful) practice in C. If ignore the return value the compiler is assuming that you are trying to call a procedure with the same name as the function you think you are calling. The error message then becomes an explanation that the compiler cannot find the a procedure with the name you specified. You are actually calling C functions. It is still a bad idea to ignore a return value. The return value is your only indication of an error from a C function. Ignoring errors is a BAD idea. Jim Rogers