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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,90884ee5a1c261b2,start X-Google-Attributes: gid103376,public From: "Barry L. Dorough" Subject: Access type problem. Date: 1998/08/20 Message-ID: <35DC295E.D6A41D97@hiwaay.net>#1/1 X-Deja-AN: 382988698 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Organization: Renaissance Internet Services Mime-Version: 1.0 Reply-To: bdorough@phaseiv.com Newsgroups: comp.lang.ada Date: 1998-08-20T00:00:00+00:00 List-Id: I have some code where I have been carrying extra records around because I don't know how to make the proper access type assignment. Any help would be greatly appreciated. ex). This is from memory I am not able to post the actual code. Sorry for any errors. type Track_Data_Type is record Threat_Number : Integer; Threat_Id : Integer; X : Long_Float; Y : Long_Float; Z : Long_Float; end record; type Track_Data_Access is access Track_Data_Type; type Track_Data_Array is array (Integer range <>) of Track_Data_Type; type Track_Data_Array_Access is access Track_Data_Array; type Map_Type is record Int_Obj : Track_Data_Array_Access := new Track_Data_Array(1..10); -- In reality this is allocated dynamically based on current air picture Tgt_Obj : Track_Data_Array_Access:= new Track_Data_Array(1..10); -- In reality this is allocated dynamically based on current air picture end record; type Current_Pair_Type is record Interceptor : Track_Data_Access; Target : Track_Data_Access; end record; -- In reality there is a Current_Pair_Type allocated for each pairing saved in a linked list procedure Assign_Current_Pair( Map : in Map_Type; Int_Index : in Integer; Tgt_Index: in Integer; Pair : in out Current_Pair_Type) is begin -- This is the crux of my problem. At present the Current_Pair_Type has -- Track_Data_Type instead of Track_Data_Access and my code looks like Pair.Interceptor := Map.Int_Obj(Int_Index); Pair.Target := Map.Tgt_Obj(Tgt_Index); -- I would have thought that this would work with the access types also, but -- I get type miss match errors. end Assign Current_Pair;