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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,35ee0472de38e833 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-12-12 13:12:09 PST Path: supernews.google.com!sn-xit-02!supernews.com!newsfeed.mesh.ad.jp!fr.clara.net!NiOuZphide.fr.clara.net!freenix!enst!enst.fr!not-for-mail From: "Beard, Frank" Newsgroups: comp.lang.ada Subject: RE: Variable length raw-byte data Date: Tue, 12 Dec 2000 16:11:13 -0500 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: avanie.enst.fr 976655527 75193 137.194.161.2 (12 Dec 2000 21:12:07 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Tue, 12 Dec 2000 21:12:07 +0000 (UTC) To: "'comp.lang.ada@ada.eu.org'" Return-Path: X-Mailer: Internet Mail Service (5.5.2448.0) Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0beta5 Precedence: bulk List-Id: comp.lang.ada mail<->news gateway Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: supernews.google.com comp.lang.ada:3013 Date: 2000-12-12T16:11:13-05:00 Your right. When I wrote the code that used Unchecked_Conversion, it was on an HP-UX box with the Alsys Ada83 compiler that didn't have System.Address_To_Access_Conversions. The addresses there did translate nicely to access types. With Ada95, the only interfaces I've written to C have used the Interfaces.C... packages. Frank -----Original Message----- From: tmoran@acm.org [mailto:tmoran@acm.org] Instead of trying to use Unchecked_Conversion to change an address into an access type (I presume that was meant here), use System.Address_To_Access_Conversions. That should work. But a System.Address need not be the same size as an access type (consider various Intel memory models), and even an access to an unconstrained array (which will involve an actual 'range being stored somewhere) and an access to a constrained array (where the compiler might keep the range somewhere else) may be different, and different from a System.Address.