comp.lang.ada
 help / color / mirror / Atom feed
From: Per Sandberg <per.s.sandberg@bahnhof.se>
Subject: Re: Returning a string from C
Date: Thu, 23 Jul 2015 06:54:08 +0200
Date: 2015-07-23T06:54:08+02:00	[thread overview]
Message-ID: <55b07370$0$12490$862e30e2@ngroups.net> (raw)
In-Reply-To: <27cd219d-fff7-4c2a-90c7-ec10a917b4cb@googlegroups.com>

Fairly simple:
Since the strings in Ada has length you cant use direct assignment with 
strings of different lengths.

just replace:
    Test_String := Value ( Test_String_Char );
with:
    Ada.Strings.Fixed.Move(Value(Test_String_Char), Test_String);

That will take care of the differences in Length and do the
   padding/trunking/failing/justification

depending on extra parameters to Move.

/Per


Den 2015-07-23 04:20, NiGHTS skrev:
>   Test_String := Value ( Test_String_Char ) ;


  parent reply	other threads:[~2015-07-23  4:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-23  2:20 Returning a string from C NiGHTS
2015-07-23  4:48 ` Jeffrey R. Carter
2015-07-23  4:54 ` Per Sandberg [this message]
2015-07-23  4:58 ` Laurent
2015-07-23  6:41 ` Pascal Obry
2015-07-23  7:17 ` Dmitry A. Kazakov
replies disabled

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