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,a80b2433ed82459a X-Google-Attributes: gid103376,public From: Laurent.Guerby@enst-bretagne.fr (Laurent Guerby) Subject: Re: Access to Address conversion question Date: 1996/03/22 Message-ID: <4xn3598nmc.fsf@leibniz.enst-bretagne.fr>#1/1 X-Deja-AN: 143690031 distribution: world sender: guerby@leibniz.enst-bretagne.fr references: content-type: text/plain; charset=US-ASCII 19: 52:09 GMT organization: Telecom Bretagne mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-03-22T00:00:00+00:00 List-Id: Jerry van Dijk writes : It might be just me again, but I cannot figure out how to convert an access : type to an address, as in assigning Address_C in the code below. GNAT (3.03) : tells me I have an invalid parameter list in the call to To_Address here ? [source and comments deleted] You should have a close look to the spec of System.Address_To_ Access_Conversions : (taken from the GNAT sources) generic type Object (<>) is limited private; package System.Address_To_Access_Conversions is pragma Preelaborate (Address_To_Access_Conversions); type Object_Pointer is access all Object; function To_Pointer (Value : Address) return Object_Pointer; function To_Address (Value : Object_Pointer) return Address; pragma Convention (Intrinsic, To_Pointer); pragma Convention (Intrinsic, To_Address); end System.Address_To_Access_Conversions; Once you instanciate it with ab "Object" type, it provides you the "access all" type, and you should use this one to avoid compiler complaints about silly type mismatch ;-). -- -- Laurent Guerby, student at Telecom Bretagne (France), Team Ada -- "Use the Source, Luke. The Source will be with you, always (GPL)" -- http://www-eleves.enst-bretagne.fr/~guerby/ (GATO Project) -- Try GNAT, the GNU Ada 95 compiler (ftp://cs.nyu.edu/pub/gnat)