comp.lang.ada
 help / color / mirror / Atom feed
* Controlled type question
@ 1999-02-14  0:00 Chad R. Meiners
  1999-02-15  0:00 ` Matthew Heaney
  0 siblings, 1 reply; 3+ messages in thread
From: Chad R. Meiners @ 1999-02-14  0:00 UTC (permalink / raw)


I am constructing a generic hash table ADT with the gnat 3.11p compiler on win NT 4.0 SP3 and I have run into a 
compilier error when I try to use the generic package.

On this line in my main program

Package Hash_table is new Hash_table_Interfaces(My_Data,  --data type stored
						aword,    --data type of key to be hashed
						"=",	  --function for my_data
						"=",      --Function for the key
						Key,      --Function to get the key from My_data
						My_Hash); --Function to hash the key

I get the following errors
instantiation error at protected_hash_tables.ads :99
instantiation error at protected_hash_tables.ads :20
Controlled type must be declared at the library level

The lines in protected_hash_tables are

99 :  Type cObject is new Limited_Controlled with record
	Controler : Passive_Controller;  --Protected type;
	Copier    : Background_Controller_ptr;  --access to a task that 		
						--enlarges the hash table in the background
      end record;

20 :  Type cObject is new Limited_Controller with private;  --hash table object


the package compilied correctly so I think I might of run up against a rule in the ARM.  If anyone could explain 
what I did wrong please do so.  I will post more code if you need it.

-Chad R. Meiners





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-02-15  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-14  0:00 Controlled type question Chad R. Meiners
1999-02-15  0:00 ` Matthew Heaney
1999-02-15  0:00   ` Chad R. Meiners

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