comp.lang.ada
 help / color / mirror / Atom feed
From: joel@redstone.army.mil (Joel Sherrill)
Subject: Re: How to print Task_ID type? (GNAT SunOS)
Date: 1996/04/04
Date: 1996-04-04T00:00:00+00:00	[thread overview]
Message-ID: <4k1ma9$brt@michp1.redstone.army.mil> (raw)
In-Reply-To: 4xu3yzpoi7.fsf@leibniz.enst-bretagne.fr



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                 |
+----------------------------------------+--------------------------------+







  reply	other threads:[~1996-04-04  0:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-03  0:00 How to print Task_ID type? (GNAT SunOS) Greg Bond
1996-04-04  0:00 ` Robert Dewar
1996-04-04  0:00   ` Greg Bond
1996-04-05  0:00     ` Robert Dewar
1996-04-05  0:00     ` Keith Thompson
1996-04-05  0:00       ` Greg Bond
1996-04-05  0:00       ` Robert Dewar
1996-04-06  0:00         ` Keith Thompson
1996-04-06  0:00           ` Robert Dewar
1996-04-07  0:00           ` Keith Thompson
1996-04-04  0:00   ` Greg Bond
1996-04-05  0:00   ` Laurent Guerby
1996-04-04  0:00     ` Joel Sherrill [this message]
1996-04-06  0:00       ` Fergus Henderson
1996-04-06  0:00         ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox