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: dennison@telepath.com Subject: Re: About to give up... Date: 1998/08/06 Message-ID: <6qcblu$f60$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 378503142 References: <6qbt86$dh$1@nnrp1.dejanews.com> Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Thu Aug 06 13:39:10 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.0; Windows NT; Gateway2000) Date: 1998-08-06T00:00:00+00:00 List-Id: In article <6qbt86$dh$1@nnrp1.dejanews.com>, i96danma@my-dejanews.com wrote: > 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 will typically write my own binding for OS routines which returns an object of the type I want to deal with. Bindings aren't that tough to write. Just 2 lines of code (not counting any special types you declare for them). Then I'll write a "thick" binding which provides an Ada-like interface to the OS routine, and doesn't burden the caller with those useless input and return values. Often times in dealing with OS routines written for users of type-unsafe languages you will have to make use of Unchecked_Conversions. That's ok. Just be careful. As for the useless values, just put them into "Trash" variables. No big deal. T.E.D. -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum