From: di98mase@hotmail.com (Sebastian)
Subject: Pointers in Ada
Date: 4 Mar 2005 04:25:58 -0800
Date: 2005-03-04T04:25:58-08:00 [thread overview]
Message-ID: <6acda821.0503040425.3b437e6a@posting.google.com> (raw)
Hi I have a question about how to initliaze a message that I want to
send. The code below shows my types and all, but my concern is the
syntax, how do I write the code that initializes the message so that I
can call the Put_Message procedure?
-- This is MDP_LLD package....
package Mdp_Lld;
type Message_Header is
record
Word_Count : Byte;
Command_Id : Byte;
end record;
subtype Mdp_Message_Data is Byte(1..500);
type A_Mdp_Message is
record
Header : aliased Message_Header;
Data : aliased Mdp_Message_Data;
end record;
type Driver_Msg_Ptr_Type is access all A_MDP_Message;
procedure Put_Message
(Msg_Buffer_Ptr : in out Client_Msg_Ptr_Type;
);
private
type Client_Msg_Ptr_Type is new Driver_Msg_Ptr_Type;
end Mdp_Lld;
-- this is another file
with Mdp_lld; use Mdp_lld;
procedure Test_Driver is
Output_Msg : Mdp_Lld.A_Mdp_Message;
Mdp_Msg_Ptr_Out : MDP_LLD.Client_Msg_Ptr_Type;
begin
-- Initialize output message
Output_Msg.Header.Word_Count := 32;
Output_Msg.Header.Command_Id := 4;
-- How do I Initialize my message to send?
Mdp_Msg_Ptr_Out'access := Output_Msg; --this does not work?
Mdp_Msg_Ptr_Out.all := Output_Msg; --this does not work?
end;
next reply other threads:[~2005-03-04 12:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-04 12:25 Sebastian [this message]
2005-03-04 13:03 ` Pointers in Ada Adrien Plisson
2005-03-04 18:26 ` Jeffrey Carter
2005-03-05 15:47 ` Sebastian
-- strict thread matches above, loose matches on Subject: below --
2001-11-14 18:16 pointers " lalasa ala
2001-11-14 18:46 ` Matthew Heaney
2001-11-14 19:04 ` Preben Randhol
2001-11-14 20:10 ` Stephen Leake
2001-11-15 7:32 ` Preben Randhol
2001-11-15 14:00 ` David Botton
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox