comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
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: <dewar.828631235@schonberg> (raw)
In-Reply-To: 316308F0.6375@ee.ubc.ca

Greg asks

"Can one of the Text_IO packages be used to print a Task_ID type (or any
access Integer type for that matter...)? I'm using GNAT under SunOS
which defines the Task_ID type in Ada.Task_Identification as private,
but implements it as an Integer access type. If one of the Text_IO
packages won't work, then what will?"

Certainly not, private means private, neither you nor Text_IO can
mess with a private type in another package. Well you culd use
unchecked conversion after looking in the private part, but that
would NOT be pleasant code.

What do you really need to do here? Doesn't the Image function for
Task_Id do what you want? That's what it's for!

   function Image (T : Task_Id) return String;





  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 [this message]
1996-04-04  0:00   ` Greg Bond
1996-04-04  0:00   ` Greg Bond
1996-04-05  0:00     ` Keith Thompson
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-05  0:00       ` Greg Bond
1996-04-05  0:00     ` Robert Dewar
1996-04-05  0:00   ` Laurent Guerby
1996-04-04  0:00     ` Joel Sherrill
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