[erlang-questions] ASCII NULL representation

Richard Carlsson richardc@REDACTED
Sat Jun 20 13:35:23 CEST 2009


info wrote:
> $char is the ascii value of the character char. If char is NULL, how to represent it ?
> 
> 2#0
> $\x{0}
> 
> Which is the simplest manner for ASCII NULL ?

You could just write 0, but if you want to indicate that the value
is indended as a character code, $\0 is simplest. (This is an octal
escape sequence, so e.g. $\10 = 8.)

    /Richard


-- 
 "Having users is like optimization: the wise course is to delay it."
   -- Paul Graham


More information about the erlang-questions mailing list