Can Oxygene support multi-line string literal?

C# has this so-called verbatim string literal, so we can have multi-line string literals without ‘+’

Does Oxygene support that? If not, is it possible to have it as a new language feature?

Yep: https://docs.elementscompiler.com/Oxygene/Expressions/Literals/

basically use the " as quote.

That is incredibly cool… code in { } is black in Water btw

  writeLn ( 'Stringbuilder ticks: ' + sw.ElapsedMilliseconds.ToString + ' Size: ' + sb.Length.ToString);
  
  writeLn ($'Stringbuilder ticks: {sw.ElapsedMilliseconds} Size: {sb.Length}');
1 Like

hmm, it’s all black, and does not highlight as code? it should…

Does highlight correctly for me:

Does in the IDE (Water) but not when I paste the code into Talk

  writeLn ( 'Stringbuilder ticks: ' + sw.ElapsedMilliseconds.ToString + ' Size: ' + sb.Length.ToString);
  
  writeLn ($'Stringbuilder ticks: {sw.ElapsedMilliseconds} Size: {sb.Length}');

Can I specify format for those inline variables?

Not yet. Only in C# mode it can do the syntax microsoft has for this like $"{date:HH:mm}"

But in Oxygene you have to use .ToString on the element you want to format.