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=unavailable autolearn_force=no version=3.4.4 Path: buffer1.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!1.eu.feeder.erje.net!feeder2.ecngs.de!ecngs!feeder.ecngs.de!81.171.118.61.MISMATCH!peer01.fr7!news.highwinds-media.com!not-for-mail X-Trace: DXC=ND`?YGf9d7=IoLUigg=iY9KkhVEZZCM; 8UR1mKPXm[B:^klTMk5HEHQDkO9>_S52W7i:[1DjiWY2J^oD5XMDJf1A0RU< X-Complaints-To: abuse@usenet.se Date: Thu, 23 Jul 2015 06:54:08 +0200 From: Per Sandberg User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Returning a string from C References: <27cd219d-fff7-4c2a-90c7-ec10a917b4cb@googlegroups.com> In-Reply-To: <27cd219d-fff7-4c2a-90c7-ec10a917b4cb@googlegroups.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <55b07370$0$12490$862e30e2@ngroups.net> NNTP-Posting-Host: 24afbf47.ngroups.net X-Received-Bytes: 1291 X-Received-Body-CRC: 1043667554 Xref: number.nntp.giganews.com comp.lang.ada:194307 Date: 2015-07-23T06:54:08+02:00 List-Id: 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 ) ;