comp.lang.ada
 help / color / mirror / Atom feed
From: brettb@tas.com (H Brett Bolen)
Subject: Q: Generic parameter names exported?
Date: 14 Mar 1995 18:48:45 -0500
Date: 1995-03-14T18:48:45-05:00	[thread overview]
Message-ID: <3k5a0t$86q@moe.tas.com> (raw)

Greetings,

Ok language lawyers, I've got a quick question.  First the code:


with System_Types,
     Generic_Queue_Bounded;


package Debug is 

  package Word32_Queue_Pkg is 
     new Generic_Queue_Bounded( Item_Type => System_Types.Integer_32,
                                Null_Item => 0);


   -- Debugging  b\253
   subtype Word32_Queue_Type is Word32_Queue_PKG.Queue_Type( Size => 100);
   ID_Word_Queue : Word32_Queue_Type;

   -- fcns
   procedure PutI(  Queue : in out Word32_Queue_Pkg.Queue_Type; 
                    Item  : in     System_Types.Integer_32 )
                                -- Word32_Queue_Pkg.Item_Type)     ???
      renames Word32_Queue_Pkg.Put;

   procedure GetI(  Queue : in out Word32_Queue_Pkg.Queue_Type; 
                    Item  :    out System_Types.Integer_32 ;
                                -- Word32_Queue_Pkg.Item_Type;     ???
                    Valid :    out Boolean) 
      renames Word32_Queue_Pkg.Get;

end Debug;


Item is the 'thing i want to put on the queue.  I thought that
'Word32_Queue_Pkg.Item_Type' could be used, but instead I had to
use 'System_Types.Integer_32'.  I think '..Item_Type' is cleaner.

The alsys compile says refer to RM 4.1.3.


How come the lines with ??? don't work?  Is there another way to do
this?  Subtyping Item_Type within W32_Q seems like a hack.


thanks
  b\253
  brettb@tas.com
  brettb@cpcug.org
  brett bolen


-- 
.
construction
   sig



             reply	other threads:[~1995-03-14 23:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-03-14 23:48 H Brett Bolen [this message]
1995-03-15 15:50 ` Q: Generic parameter names exported? Mats Weber
replies disabled

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