comp.lang.ada
 help / color / mirror / Atom feed
From: v025@truman.edu (Chad R. Meiners)
Subject: Controlled type question
Date: 1999/02/14
Date: 1999-02-14T00:00:00+00:00	[thread overview]
Message-ID: <36c743da.0@silver.truman.edu> (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





             reply	other threads:[~1999-02-14  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-14  0:00 Chad R. Meiners [this message]
1999-02-15  0:00 ` Controlled type question Matthew Heaney
1999-02-15  0:00   ` Chad R. Meiners
replies disabled

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