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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,35629eebe01bcdaf X-Google-Attributes: gid103376,public From: email@domain.com (Dale Stanbrough) Subject: Re: About to give up... Date: 1998/08/06 Message-ID: #1/1 X-Deja-AN: 378492741 References: <6qbtl7$v6$1@nnrp1.dejanews.com> X-Complaints-To: abuse@cs.rmit.edu.au X-Trace: emu.cs.rmit.edu.au 902405776 11665 131.170.27.23 (6 Aug 1998 12:16:16 GMT) Organization: RMIT NNTP-Posting-Date: 6 Aug 1998 12:16:16 GMT Newsgroups: comp.lang.ada Date: 1998-08-06T12:16:16+00:00 List-Id: Mr i96danma@my-dejanews.com wrote: " I've been programming in Ada 95 for a while and like the language because of it's strong type checking, OO-friendly style and clean and understandable code. Just recently I stepped into the world of Win32-programming and got hold of the Win32Ada binding, which I after some effort and a lot of help (thanks Jesper!) finally got working. The first steps were no problem and I quickly got used to the API. The worst problems though were the type conversions, where Ada's type checking suddenly was an obstacle to overcome, and the fact that you always have to take care of the return values, even if you don't care. And it seems as Win32 returns a lot of values that are, most of the time, unimportant." I view this as being a good thing. The functions are returning a value for a reason (i presume!). Surely it is ignore at your peril? If you really don't like it, or don't want an if statement at each step you can either write a wrapper function to give it a procedure call syntax, which can either ignore the return result, or raise an exception or do... dummy : integer range 0..0; dummy := some_function_call (...); and have a constraint error exception if the function returns a dud value (presuming 0 = ok). " Altogether I see these drawbacks as (almost) impossible to overcome and have been thinking of starting to use C/C++ instead, after all it's the "native language" of Win32. I'd like to stick to Ada, but..." Perhaps using the automatic bindings generator would a good way to go. Certainly handcrafting Ada bindings is a long and laborious task. Dale