Vá: [erlang-questions] Newbie question converting char to ascii value
Attila Rajmund Nohl
attila.r.nohl@REDACTED
Fri Jun 5 18:36:24 CEST 2009
2009/6/5, Paul Johnston <paul.a.johnston@REDACTED>:
> Hi
>
>
>
> I want to take a character store it in a variable and then get it's
> ascii value.
>
> I know
>
> 1> $a.
>
> 97
>
>
>
> But want something like
>
>
>
> 2> Letter = a.
>
> a
>
> 3> $Letter.
>
> * 1: syntax error before: etter
>
> 3>
1> [Letter]=atom_to_list(a).
"a"
2> Letter.
97
But why would you want to do such thing?
More information about the erlang-questions
mailing list