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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC 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: joel@redstone.army.mil (Joel Sherrill) Subject: Re: How to print Task_ID type? (GNAT SunOS) Date: 1996/04/04 Message-ID: <4k1ma9$brt@michp1.redstone.army.mil>#1/1 X-Deja-AN: 145859620 distribution: world references: <4xu3yzpoi7.fsf@leibniz.enst-bretagne.fr> organization: U.S. Army Missile Command, RD&E Center reply-to: joel@redstone.army.mil newsgroups: comp.lang.ada Date: 1996-04-04T00:00:00+00:00 List-Id: In article <4xu3yzpoi7.fsf@leibniz.enst-bretagne.fr>, Laurent.Guerby@enst-bretagne.fr (Laurent Guerby) writes: >Greg Bond writes >: 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? > > No, like in C you have to convert them to an integer type before >printing them using your favourite output routine (printf or Put >;-). This can be done in "portable" Ada 95 (as far as this kind of >game can be tagged as portable ...) : I am not sure what the origin of the "%p" printf specifier is but it is present for all the C libraries I use. With it, you can: printf( "The address of X is %p\n", &X ); You are correct that without this, you must convert the address to an integer format. +----------------------------------------+--------------------------------+ | Joel Sherrill | Sr. Computer Scientist | | joel@merlin.gcs.redstone.army.mil | On-Line Applications Research | | Ask me about RTEMS: a free real-time | Huntsville AL 35805 | | multiprocessor executive! | (205) 883-0131 | +----------------------------------------+--------------------------------+