From: "Barry L. Dorough" <bdorough@hiwaay.net>
Subject: Access type problem.
Date: 1998/08/20
Date: 1998-08-20T00:00:00+00:00 [thread overview]
Message-ID: <35DC295E.D6A41D97@hiwaay.net> (raw)
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;
next reply other threads:[~1998-08-20 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-08-20 0:00 Barry L. Dorough [this message]
1998-08-20 0:00 ` Access type problem David C. Hoos, Sr.
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox