What does the $ mean in erlang

Viewed 263

what's the $ sign mean?

For example:

is_digit(Ch) ->
    $0 =< Ch andalso Ch =< $9.

I've also seen it been typed like:

$(, $), $+, $*
1 Answers

$ use to indicate character in ASCII. For example

1> $a.
97
2> $1.
49
3> [49,50].
"12"
4> $\n. ### newline character
10

Your function is meaning that the character input is digit or not.

Related