the newline _character_?

Vladimir Sekissov <>
Thu Nov 21 11:27:52 CET 2002


Hi,

eleberg> greetings,
eleberg> 
eleberg> characters in erlang are written as $<the-character>. ie ';' is $; .
eleberg> how do i write newline? not in a string, that would be "\n", but as a
eleberg> character?
eleberg> 
eleberg> moreover, is there is_whitespace() function is some module?

Look at table on page 19 of "Concurent Programming in Erlang", Erlang
presentation of characters is mostly the same as in C. New line would
be:

NewLine = $\n.

is_whitespace(C) when C == $\t; C == $\040 ->
  true;
is_whitespace(C) ->
  false.

Best Regards,
Vladimir Sekissov



More information about the erlang-questions mailing list