comp.lang.ada
 help / color / mirror / Atom feed
From: Eryndlia Mavourneen <eryndlia@gmail.com>
Subject: Re: Passing a String to a C/C++ Subprogram (Special Case)
Date: Thu, 17 Oct 2013 06:05:07 -0700 (PDT)
Date: 2013-10-17T06:05:07-07:00	[thread overview]
Message-ID: <24ce5a1f-99e6-465c-b986-85fc09e84ee6@googlegroups.com> (raw)
In-Reply-To: <12b085dd-8e96-477e-bbf3-135330275b69@googlegroups.com>

On Wednesday, October 16, 2013 3:48:11 PM UTC-5, Adam Beneschan wrote:
> . . .
> Hopefully we can presume that Eryndlia has already thought about this and knows what values the C code she's interfacing to is expecting to be in those bytes.
> 
>                             -- Adam

Yes, indeed!  The strings are either simple names or file paths.  Some important considerations are:

1) I am limited to Ada95 (so no aspects including type aspects)

2) The language of the underlying subprograms may or may not be C/C++.  This means I need to keep things as simple as possible for the client developer.  I am hoping that the "pragma Convention (C, ...)" will do what it sounds as if it does (along with a "pragma Import") to set things up properly.

3) I believe that the client developer will need to be responsible for adding any nul character, since the subprogram does not know whether there is junk at the end of the valid data.

-- Eryndlia Mavourneen (KK1T)

  reply	other threads:[~2013-10-17 13:05 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-15 19:54 Passing a String to a C/C++ Subprogram (Special Case) Eryndlia Mavourneen
2013-10-15 20:11 ` Adam Beneschan
2013-10-15 21:02   ` Eryndlia Mavourneen
2013-10-16  7:17     ` Dmitry A. Kazakov
2013-10-16 15:14       ` Jeffrey Carter
2013-10-16 17:32     ` Martin
2013-10-16 17:42       ` Eryndlia Mavourneen
2013-10-16 17:54         ` Martin
2013-10-16 18:13           ` Eryndlia Mavourneen
2013-10-16 19:40             ` Simon Wright
2013-10-16 20:02               ` Eryndlia Mavourneen
2013-10-19  2:11           ` Randy Brukardt
2013-10-16 19:11       ` Adam Beneschan
2013-10-16 21:31         ` Martin
2013-10-16 21:41           ` Adam Beneschan
2013-10-16 23:15             ` Martin
2013-10-15 20:59 ` Jeffrey Carter
2013-10-15 21:13   ` Eryndlia Mavourneen
2013-10-15 22:19     ` Shark8
2013-10-16  0:00     ` Jeffrey Carter
2013-10-17  9:55     ` Georg Bauhaus
2013-10-16 20:17 ` sbelmont700
2013-10-16 20:48   ` Adam Beneschan
2013-10-17 13:05     ` Eryndlia Mavourneen [this message]
2013-10-17 13:58       ` sbelmont700
2013-10-17 16:28         ` Eryndlia Mavourneen
replies disabled

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