[erlang-questions] io_lib printable list
Gleb Peregud
gleber.p@REDACTED
Sun Sep 22 10:15:00 CEST 2013
Because "1" is actually a syntactic sugar for [$1] which is syntactic sugar
for [49]
On Sun, Sep 22, 2013 at 2:08 AM, Yuri Shefer <shefys@REDACTED> wrote:
> Hi all,
>
> I have a silly question.
>
> Why io_lib:printable_list() accept characters only in the quotes? Is it
> needed even for the numbers?
>
> 8> io:getopts().
> [{expand_fun,#Fun<group.0.56199974>},
> {echo,true},
> {binary,false},
> {encoding,latin1}]
> 9> io_lib:printable_list(1).
> false
> 10> io_lib:printable_list("1").
> true
>
>
> --
> Best regards,
> Yuri
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130922/eb4c31e6/attachment.htm>
More information about the erlang-questions
mailing list