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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9208806da73239cc X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!skynet.be!newspost001!tjb!not-for-mail Date: Fri, 04 Mar 2005 14:03:48 +0100 From: Adrien Plisson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: fr-fr, fr-be, fr, en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Pointers in Ada References: <6acda821.0503040425.3b437e6a@posting.google.com> In-Reply-To: <6acda821.0503040425.3b437e6a@posting.google.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <42285cb5$0$30175$ba620e4c@news.skynet.be> Organization: -= Belgacom Usenet Service =- NNTP-Posting-Host: 54af87a1.news.skynet.be X-Trace: 1109941429 news.skynet.be 30175 80.200.31.84:3573 X-Complaints-To: usenet-abuse@skynet.be Xref: g2news1.google.com comp.lang.ada:8621 Date: 2005-03-04T14:03:48+01:00 List-Id: 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