From: Adrien Plisson <aplisson-news@stochastique.net>
Subject: Re: Pointers in Ada
Date: Fri, 04 Mar 2005 14:03:48 +0100
Date: 2005-03-04T14:03:48+01:00 [thread overview]
Message-ID: <42285cb5$0$30175$ba620e4c@news.skynet.be> (raw)
In-Reply-To: <6acda821.0503040425.3b437e6a@posting.google.com>
Sebastian wrote:
> -- 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?
well, it seems you are having a lot of troubles with pointers/access
types.
what you want to do is setting Mdp_Msg_Ptr_Out to a value which will
point to Output_Msg.
you wrote:
- first line: (vaguely) setting the address of Mdp_Msg_Ptr_Out to be
the same as the address of Output_Msg.
- second line: copy the content of Ouput_Msg at the address pointed to
by Mdp_Msg_Ptr_Out, which is uninitialized
reverse the problem !
Mdp_Msg_Ptr_Out := Output_Msg'Access;
note that this will need Output_Msg to be declared as aliased... also
MDP_LLD.Client_Msg_Ptr_Type needs to be visible, and in your sample,
it is private. (there are also other solutions to your problem).
I suggest you grab your favorite book on Ada and re-read the chapter
concerning access types. don't try to do something too elaborated at
first.
--
rien
next prev parent reply other threads:[~2005-03-04 13:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-04 12:25 Pointers in Ada Sebastian
2005-03-04 13:03 ` Adrien Plisson [this message]
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