newlines

10 views
Skip to first unread message

Andrew Dabrowski

unread,
Jan 13, 2018, 12:51:53 PM1/13/18
to pure-lang
How does one insert a newline in a string?

> "a" + "\n" + "b";
"a\nb"
> "a" + "%n" + "b";
"a%nb"



Andrew Dabrowski

unread,
Jan 13, 2018, 3:06:50 PM1/13/18
to pure-lang
Nevermind - evidently \n only produces a newline when writing with puts.

Albert Graef

unread,
Jan 13, 2018, 8:47:10 PM1/13/18
to pure...@googlegroups.com
If you enter an expression in the REPL, the interpreter evaluates the expression and prints the result in Pure syntax. There's no special-casing of strings in the REPL's output.

--
You received this message because you are subscribed to the Google Groups "pure-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pure-lang+unsubscribe@googlegroups.com.
To post to this group, send email to pure...@googlegroups.com.
Visit this group at https://groups.google.com/group/pure-lang.
For more options, visit https://groups.google.com/d/optout.



--
Dr. Albert Gr"af
Computer Music Research Group, JGU Mainz, Germany
Email:  agg...@gmail.com
WWW:    https://plus.google.com/+AlbertGraef
Reply all
Reply to author
Forward
0 new messages