fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 48: Multi-line string literal
Idiom # 48: Multi-line string literal
See
programming-idioms.org
:
Code
s := ("Strings extending over several lines are currently not well supported\n" + "in Fuzion. They can be constructed out of several shorter strings\n" + "that are concatenated using 'infix +'. Line feeds are inserted using\n" + "a backslash followed by an 'n', i.e, '\\n'. Additionally, the string\n" + "has to be enclosed in parentheses since operator expressions are\n" + "limited to one line.\n")
What are effects?
Running Example
ex48 is s := ("Strings extending over several lines are currently not well supported\n" + "in Fuzion. They can be constructed out of several shorter strings\n" + "that are concatenated using 'infix +'. Line feeds are inserted using\n" + "a backslash followed by an 'n', i.e, '\\n'. Additionally, the string\n" + "has to be enclosed in parentheses since operator expressions are\n" + "limited to one line.\n") say s
What are effects?
last changed: 2024-07-01
next: Idiom # 49: Split a space-separated string