[erlang-questions] atoms with newlines
Richard A. O'Keefe
Tue Feb 18 23:57:43 CET 2014
On 19/02/2014, at 10:33 AM, Vlad Dumitrescu wrote:
> Eshell V5.10.4 (abort with ^G)
> 1> 'foo\n\
> 1> bar'.
> I had expected that <backslash><newline> would
> - be rejected as a syntax error, or
> - be discarded like in C and Prolog.
> I did _not_ expect it to turn into <newline>.
> Actually, what I was referring to was that that last backslash isn't really needed at all.
No, the last backslash IS needed because I *don't* want
the newline. In ISO Prolog I can write
where the vertical bars show record boundaries,
and get the same effect as
You are concerned about atoms that include newline characters.
I am concerned about atoms that for one reason or another
need to be split over lines WITHOUT introducing newline characters.
I just want \<newline> to work sensibly and to be so documented.
More information about the erlang-questions