forked from brombres/Rogue
-
Notifications
You must be signed in to change notification settings - Fork 2
Literal Values
AbePralle edited this page Mar 1, 2016
·
2 revisions
There are four different ways to write literal strings:
"A standard double-quoted literal string."
'A "JavaScript-style" single-quoted literal string of 2+ characters.'
''Double single quotes.''
@|A multi-line "verbatim" string that begins with "@|" and
|has a continuation character of '|' on each next line.
|- Newlines are included in the resulting string.
|- The '|' continuation can be indented any amount.
|- Escape sequences are ignored - the sequence \n is
| not turned into a newline.
See also: Formatted Strings
2.54, 0.0, -3e10, 3.2E-2, pi
-5, 0, 22
'A', '\'', '"', '3', '\n'
true, false