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,aa7b0448abeecbba X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: How to print Task_ID type? (GNAT SunOS) Date: 1996/04/05 Message-ID: #1/1 X-Deja-AN: 145944309 references: <316308F0.6375@ee.ubc.ca> <31642F61.1D2B@ee.ubc.ca> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-04-05T00:00:00+00:00 List-Id: Greg asked "Indeed it is. My oversight. This function does not handle the more general problem I posed though. Is there a general facility for printing access types? The GNAT implementation of the Image function above is a system level (i.e. platform dependent) routine specifically for the Task_ID type. The only Ada references I've got are Barnes for Ada 95 and the ALRM, both of which are woefully inadequate on the topic of Ada I/O." You really must get annex A of the RM, it's quite easy to read (much easier than the rest of the RM), and is full of useful stuff. You can pull it off the net, see Ada FAQ for details. The easiest way to do what you want is: Integer_Address'Image (To_Integer (Pointer.all'Address)) this is from system.storage_elements If you want to output the address in hex, then still use To_Integer(Pointer.all'Addess) but output the integer value using Text_IO.Modular_IO.Put with an appropriate base parameter.