[erlang-questions] Why ~n instead of n?

Robert Virding <>
Wed Jan 17 23:38:34 CET 2007


Hopefully there will be no lightning strike. :-)

There was meant to be a difference: \n is the newline character while ~n 
is causes a system-dependant new line in the current implementation. 
There is in fact no difference.

Robert

autophile wrote:
> Does anyone know why there is a ~n in the io:fwrite format when n seems to work just as well? Is it there for historical reasons? Am I committing a sin by using n and could lightning strike my program dead under some obscure circumstance?
> 
> Thanks,
> 
> --Rob
> _________________________________________________________
> Post sent from http://www.trapexit.org
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
> 



More information about the erlang-questions mailing list