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,491f04bc76bcfb52,start X-Google-Attributes: gid103376,public From: jsanchor@my-dejanews.com Subject: Access types Date: 1998/05/27 Message-ID: <6khbm1$ec1$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 356871308 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Wed May 27 15:32:17 1998 GMT X-Http-User-Agent: Mozilla/4.04 [en] (X11; U; SunOS 5.5.1 sun4u) Newsgroups: comp.lang.ada Date: 1998-05-27T00:00:00+00:00 List-Id: HI, I am working with access types and have a challenge at hand which I seem to be losing. Need some help. I have data in Non Volatile Memory and RAM that I need to access using access types. The problem is I need to have the same "types" to work on the data, ie compare them, calculate checksum, etc. ex. I have a package that looks like this: -------------NVM-------------------------------------- type Non_Volatile_Type is tagged private; type Ptr_to_Non_Volatile_Type is access all Non_Volatile_Type'class; ????Ptr_to_Data : access Non_Volatile_Type'Class?????; type Information_Record_Type is record Tag_Part : Tag; NVM_Access : Ptr_to_Data???; RAM_Access : Ptr_to_Data???; end record; procedure Compute_Checksum (block : ???Ptr_to_Data); or procedure Compute_Checksum (block : ???access Non_Volatile_Type'Class); private type Non_Volatile_Type is tagged record checksum : Storage_Element; end record; Somebody trying to use my package will declare a package somewhat like this ---------------------USER Spec------------------------------------ type List_NVM_Type is new ddNVM.Non_Volatile_Type with record word1 : INTEGER := 8; end record; ---------------------USER Body------------------------------------ procedure test is my_nvm : aliased List_NVM_Type; begin ddNVM.Compute_checksum(my_nvm'access); end test; Does anybody know of a way. Thanks in advance. sincerely, Jay Sanchorawala. -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading