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,86ec22e070e319c0 X-Google-Attributes: gid103376,public From: robert_dewar@my-dejanews.com Subject: Re: How do I get this to work?? Date: 1999/01/10 Message-ID: <77b9cp$5kh$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 430993276 References: <76s0dp$1v4$1@nntp3.uunet.ca> <76tbvv$ba5$1@nntp3.uunet.ca> <770ifd$qui$1@goblin.uunet.ca> <771bl9$sla$1@nnrp1.dejanews.com> X-Http-Proxy: 1.0 x15.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Sun Jan 10 22:25:30 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-01-10T00:00:00+00:00 List-Id: In article , warwicks@telusplanet.net (Chris Warwick) writes: > I've got it working... My uneasyness stems from the >fact > that when I ran into unchecked_conversion I was able to > get someone to explain to me how it really was "supposed" > to work, and once I understood, I agreed. Thus far I > still do not understand how a package can export > a "useful" pointer definition... But this problem only arises for the unusual case of aliased variables, which normally should be used only for interfacing to foreign routines, where the use of unchecked_access is entirely appropriate. I notice that a lot of people, especially former C programmers greatly overuse aliased variables. There was a reason for completely excluding such variables from the Ada 83 language, and good practice in Ada 95 is to absolutely minimize their use. Certainly the idea that a package is not useful because it requires the use of Unchecked_Access for the unusual case of using aliased variables represents an entirely inappropriate viewpoint for the Ada 95 world. Remember that aliased variables were introduced for limited purposes in Ada 95, if you find yourself making everything aliased, you are probably not organizing things in an appropriate manner. For example, even in the case of calls to interfaced routines, we far prefer to pass IN or IN OUT parameters by reference than to pass pointers as a general rule. Robert Dewar -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own