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,83d7abe924220a12,start X-Google-Attributes: gid103376,public From: Al Johnston Subject: HOW? item_ptr := item'access Date: 2000/04/11 Message-ID: <38F34D00.FA32AC68@mindspring.com>#1/1 X-Deja-AN: 609697732 Content-Transfer-Encoding: 7bit Organization: MindSpring Enterprises X-Accept-Language: en X-Server-Date: 11 Apr 2000 16:06:34 GMT Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-04-11T16:06:34+00:00 List-Id: I am trying to get rid of some of are use of system.address/ unchecked_conversion as part of my port to ada95. I have run into a snag. The line (full test case code follows this msg): t_DBase_Ptr : Database_Ptr_Typ := Database'access; <<< ----- compiler complans causes a compiler error indicating that "database" must be declare "aliased" that is database : aliased database_typ; problem is that this object is never declared in the ada code (it is created/destroyed in our c code) so there is no place to do this. Is there a way of doing the same thing useing "use"/"use at"? what should I do to get this to work? tnx, -al package PDB is type Database_Typ is limited private; type Database_Ptr_Typ is access Database_Typ; procedure Close(Database : in out Database_Typ); private type Database_Item; type Database_Typ is access Database_Item; end PDB; with PDB_C_Lib; with system; package body PDB is type Parameter_Item is new System.Address; type Database_Item is new System.Address; procedure Close(Database : in out Database_Typ) is t_DBase_Ptr : Database_Ptr_Typ := Database'access; <<< ----- compiler complans begin PDB_C_Lib.pdb_close(t_DBase_Ptr); end Close; end PDB; package PDB_C_Lib is procedure pdb_close(Database_Ptr : PDB.Database_Ptr_Typ); pragma import(c,pdb_close,"pdb_close"); end PDB_C_Lib; the c "pdb_close" routine sets the pointer (database_ptr) to null;