comp.lang.ada
 help / color / mirror / Atom feed
* pointers in Ada
@ 2001-11-14 18:16 lalasa ala
  2001-11-14 18:46 ` Matthew Heaney
  2001-11-14 19:04 ` Preben Randhol
  0 siblings, 2 replies; 10+ messages in thread
From: lalasa ala @ 2001-11-14 18:16 UTC (permalink / raw)
  To: comp.lang.ada



-- 
lalasa ala
lalasa_1999@onebox.com - email
(513) 766-2000 x4491 - voicemail/fax

hi ,
  I have two questions on Ada.
 1)   How are pointers represented in Ada (Ex: if T is a pointer of some
kind R , how is it represented in Ada).

 2)  How are exceptions handled in Ada.

regards,
Lalasa Ala.

__________________________________________________
FREE voicemail, email, and fax...all in one place.
Sign Up Now! http://www.onebox.com




^ permalink raw reply	[flat|nested] 10+ messages in thread
* Pointers in Ada
@ 2005-03-04 12:25 Sebastian
  2005-03-04 13:03 ` Adrien Plisson
  2005-03-04 18:26 ` Jeffrey Carter
  0 siblings, 2 replies; 10+ messages in thread
From: Sebastian @ 2005-03-04 12:25 UTC (permalink / 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;



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-03-05 15:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-14 18:16 pointers in Ada 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
  -- strict thread matches above, loose matches on Subject: below --
2005-03-04 12:25 Pointers " Sebastian
2005-03-04 13:03 ` Adrien Plisson
2005-03-04 18:26 ` Jeffrey Carter
2005-03-05 15:47   ` Sebastian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox