Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
io_lib:fread("~d/~d/~d", "2013/03/03").
上面的代码在 erlang 中工作,所以理想情况下,下面的代码应该可以在 elixir 中工作
:io_lib.fread("~d/~d/~d", "2013/03/03")
但它会产生错误“没有匹配的函数子句”
检查后发现 elixir 调用了类似的模块
:io_lib_fread.fread("~d/~d/~d", "2013/03/03", 0, [])
erlang 中的双引号"char list"转换为 Elixir 中的单引号'char list'。
"char list"
'char list'