comp.lang.ada
 help / color / mirror / Atom feed
From: Laurent <lutgenl@icloud.com>
Subject: Returning a string from C
Date: Wed, 22 Jul 2015 21:58:21 -0700 (PDT)
Date: 2015-07-22T21:58:21-07:00	[thread overview]
Message-ID: <e4285182-bb41-4241-858a-a10d241843a8@googlegroups.com> (raw)
In-Reply-To: <27cd219d-fff7-4c2a-90c7-ec10a917b4cb@googlegroups.com>

Test_String is of Length 100. So it expects a string exactly this length.
When you try to assign the string "Hello World", you get a length error because it is to short.

Unfortunately I am only a noob and I have quite a hard time with the standard strings myself. 

You could try Test_String : String; so it is not constrained but I don't think that the compiler accepts. Tried that already with my own programms. Sometimes it works but not always. 

Of course I could be completely wrong.

Laurent

  parent reply	other threads:[~2015-07-23  4:58 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
2015-07-23  4:58 ` Laurent [this message]
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