comp.lang.ada
 help / color / mirror / Atom feed
From: dvdeug@x8b4e53cd.dhcp.okstate.edu (David Starner)
Subject: Re: Passing Strings between Ada and C++
Date: 2000/01/12
Date: 2000-01-12T00:00:00+00:00	[thread overview]
Message-ID: <85iq0u$7pu3@news.cis.okstate.edu> (raw)
In-Reply-To: 387CDCEC.461BAB3F@cpmx.saic.com

On Wed, 12 Jan 2000 14:58:36 -0500, Caroline <caroline.j.swindellNOSPAM@cpmx.saic.com> wrote:
>I am experimenting with interlanguage programming and have the following
>question:
>
>What is the best way to pass a string from C++ to an Ada procedure and
>to pass one out of Ada back to C++?   I would like to know in particular
>what incarnations of strings to use on each side.
>
>I am using Aonix ObjectAda 7.1.2 and MS Visual Studio 6.0.

If you use C null-terminated char arrays, you can translate between 
C strings and Ada strings using Interfaces.C. See your local header
file or the ARM for more information.

GNAT would let you interface directly with the C++ string class using
Interfaces.CPP. I don't think ObjectAda has a similar facility, but it
can't hurt to look.

-- 
David Starner - dstarner98@aasaa.ofe.org
If you wish to strive for peace of soul then believe; 
if you wish to be a devotee of truth, then inquire.
   -- Friedrich Nietzsche




  reply	other threads:[~2000-01-12  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-12  0:00 Passing Strings between Ada and C++ Caroline
2000-01-12  0:00 ` David Starner [this message]
2000-01-12  0: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