Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Haskell
s = unlines [
     "several"
    ,"lines"
    ,"of"
    ,"text"]

unlines concatenates a list of strings, inserting a newline between each.
It is inverse to lines, which splits a string by newlines
s :: String
s = "We will put a backslash to take a break\
     \and then a backslash to resume"
s : String := "Will this compile? " &
     "Oh yes it will";

I'm assuming this is what is meant by "consisting in several lines of text."

Use New_Line for line feeds.

New implementation...