|
|
1
3
Erlang不区分字符和整数。特别是,Erlang字符串文字像
Erlang R16B03 (erts-5.10.4) [64-bit] [smp:4:4] [async-threads:10] Eshell V5.10.4 (abort with ^G) 1> [$H,$E,$L,$L,$O]. "HELLO" 2> |
|
|
2
2
像
在您显示的示例中,看起来需要将小整数保留为整数,同时将字母值打印为字母。类似的方法可能会奏效:
这是它的输出:
|
|
|
3
1
如果要将内容打印为字符串,请使用:
|