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=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,242de5cfd0d5b4a0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-21 13:44:53 PST Newsgroups: comp.lang.ada From: Ted Dennison References: Subject: Re: Interfacing with C++ Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Thu, 21 Jun 2001 16:44:21 EDT Organization: http://www.newsranger.com Date: Thu, 21 Jun 2001 20:44:22 GMT Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!feed.textport.net!news.bnb-lp.com!newsranger.com!www.newsranger.com!not-for-mail Xref: archiver1.google.com comp.lang.ada:9003 Date: 2001-06-21T20:44:22+00:00 List-Id: In article , Hagi Yilmaz says... >I have a little problem in Mapping C++, char * to Ada 95 >c.strings_chars_ptr. > >extern "C" {void ada_call (char *x) }; // ada function I call. >in ada code : > procedure ada_call(x : in out c.strings_chars_ptr) is That's wrong. Read your Ada references (prefereably the LRM) a bit more carefully. What you are saying with "in out c.strings_chars_ptr" is that the program is allowed to update the value of the pointer. In order to do that in C, you'd need a "char **" parameter. You are going to need to either change the C side to "char **", or the Ada side to something like C.Chars_Array or mode "in", depending on what you really want to do with the parameter. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html home email - mailto:dennison@telepath.com