From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f45af6dd43d3673a,start X-Google-Attributes: gid103376,public From: v025@truman.edu (Chad R. Meiners) Subject: Controlled type question Date: 1999/02/14 Message-ID: <36c743da.0@silver.truman.edu>#1/1 X-Deja-AN: 444457634 Content-Type: Text/Plain; charset=US-ASCII Organization: Missouri Research and Education Network Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-02-14T00:00:00+00:00 List-Id: 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