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,fc95c1889fbed9e5 X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: C Interface question Date: 1996/07/11 Message-ID: #1/1 X-Deja-AN: 168312798 references: <4s1q6c$2es@ionews.ionet.net> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-07-11T00:00:00+00:00 List-Id: Kevin said "I haven't tried it, but if a 'Address is the same size as an Access type, and ha s the same value, then you may be able to do the following: function C_Function ( value : in Integer; Result : in System.Address ) return Sy stem.Address; Then, just use Unchecked conversion to convert the result to an Access type, and access it that way." This is non-portable, and really too low level. Using a named access type is much cleaner, and cleaner still is just using an in out parameter assuming your compiler follows the proper Ada 95 implementation advice.