Can I disable printing lists of small integers as strings in Erlang shell?

前端 未结 7 1020

The Erlang shell \"guesses\" whether a given list is a printable string and prints it that way for convenience. Can this \"convenience\" be disabled?

7条回答
  •  眼角桃花
    2020-11-27 21:27

    I tend to do it by prepending an atom to my list in the shell.

    for example:

    Eshell V5.7.4  (abort with ^G)
    1> [65,66,67].
    "ABC"
    2> [a|[65,66,67]].
    [a,65,66,67]
    

    could also be [a,65,66,67], of course. but [a|fun_that_returns_a_list()] will print "the right thing(ish) most of the time"

提交回复
热议问题