comp.lang.ada
 help / color / mirror / Atom feed
* How to append linefeed to unbounded string?
@ 2015-11-15 23:16 John Smith
  2015-11-15 23:22 ` Jeffrey R. Carter
  0 siblings, 1 reply; 3+ messages in thread
From: John Smith @ 2015-11-15 23:16 UTC (permalink / 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...


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-15 23:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-15 23:16 How to append linefeed to unbounded string? John Smith
2015-11-15 23:22 ` Jeffrey R. Carter
2015-11-15 23:25   ` John Smith

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