Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Pascal
var 
  _s: String;
begin
  _s := 'one' + LineEnding + 'two' + LineEnding + 'three'
end.

LineEnding is defined as a constant in FreePascal. Its implementation is platform dependant.
var 
  s: String;
begin
  s := '''
one
two
three
''';
end.

Since Delphi 12 Athens, you can use multilines in pascal code.
var 
  s: String;
begin
  s := 'one' + sLineBreak + 'two' + sLineBreak + 'three'
end.

In Delphi implementation you should use sLineBreak instead of FreePascal's LineEnding constant.
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...