Skip to content
AbePralle edited this page Mar 1, 2016 · 2 revisions

Literal Strings

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

Literal Reals

2.54, 0.0, -3e10, 3.2E-2, pi

Literal Integers

-5, 0, 22

Literal Characters

'A', '\'', '"', '3', '\n'

Literal Logicals

true, false

Clone this wiki locally