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,b582310cfc030f2c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-15 23:52:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed.news.qwest.net!namche.sun.com!news1brm.central.sun.com!new-usenet.uk.sun.com!not-for-mail From: Ole-Hjalmar Kristensen Newsgroups: comp.lang.ada Subject: Re: Mixed languages and frustration. Date: 16 Oct 2003 08:40:13 +0200 Organization: Sun Microsystems Message-ID: References: NNTP-Posting-Host: khepri06.norway.sun.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: new-usenet.uk.sun.com 1066286413 25983 129.159.112.195 (16 Oct 2003 06:40:13 GMT) X-Complaints-To: usenet@new-usenet.uk.sun.com NNTP-Posting-Date: 16 Oct 2003 06:40:13 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:947 Date: 2003-10-16T06:40:13+00:00 List-Id: >>>>> "SL" == Stephen Leake writes: SL> Freejack writes: >> Alright, so I'm sitting here trying to juggle between C pointers and Ada >> access types/allocators, with moderate success. And I start wondering to >> myself "How many people on comp.lang.ada nearly blow a fuse when doing >> the same thing?" SL> I try to avoid code in C at all costs. SL> When I do need to pass pointers to C, I just use 'Address on the Ada SL> side. It's not guarantteed portable, but neither is the C code, so SL> it's good enough. And it's far easier to get right, and usually more SL> efficient, than messing with Interfaces.C pointer stuff. SL> -- SL> -- Stephe Yes. And in the same spirit, to go in the opposite direction, if you have got a C pointer, just declare an Ada object and use an address rep clause to put it where the pointer points. Same caveats apply. -- If you are going to shoot, shoot, don't talk. Il Brutto