From: John Smith <yoursurrogategod@gmail.com>
Subject: How to append linefeed to unbounded string?
Date: Sun, 15 Nov 2015 15:16:48 -0800 (PST)
Date: 2015-11-15T15:16:48-08:00 [thread overview]
Message-ID: <e8796a00-96fa-4773-bff8-f4148c30432e@googlegroups.com> (raw)
Hello,
This is what I'm doing:
Ada.Strings.Unbounded.Append(Result,
Ada.Strings.Unbounded.To_Unbounded_String(
Ada.Characters.Latin_1.LF));
And this is the error that I'm getting:
$ gnatmake -g ada_in_string.adb
gcc -c -g ada_in_string.adb
ada_in_string.adb:16:61: no candidate interpretations match the actuals:
ada_in_string.adb:16:104: expected type "Standard.Integer"
ada_in_string.adb:16:104: found type "Standard.Character"
ada_in_string.adb:16:104: ==> in call to "To_Unbounded_String" at
a-strunb.ads:97
ada_in_string.adb:16:104: ==> in call to "To_Unbounded_String" at
a-strunb.ads:94
gnatmake: "ada_in_string.adb" compilation error
What threw me for a loop is that when I look at the Append procedure
documentation, it turns out that it should be able to take an input of a
Character type.
Not sure why I'm getting this error...
next reply other threads:[~2015-11-15 23:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-15 23:16 John Smith [this message]
2015-11-15 23:22 ` How to append linefeed to unbounded string? Jeffrey R. Carter
2015-11-15 23:25 ` John Smith
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox