Elixir是否有保存当前文件名的变量(ala Ruby’;s_uuufile_uuu)?
如何在Elixir中指定正在编译的当前文件?在Ruby中,我可以使用Elixir是否有保存当前文件名的变量(ala Ruby’;s_uuufile_uuu)?,elixir,Elixir,如何在Elixir中指定正在编译的当前文件?在Ruby中,我可以使用\uuu文件\uuu变量。长生不老药中有等效物吗 这是我的剧本: IO.puts “#{__FILE__}” 以下是输出: ** (CompileError) ModulesAndFunctions-7.exs:3: undefined function __FILE__/0 (elixir) expanding macro: Kernel.to_string/1 ModulesAndFunctions-7.e
\uuu文件\uuu
变量。长生不老药中有等效物吗
这是我的剧本:
IO.puts “#{__FILE__}”
以下是输出:
** (CompileError) ModulesAndFunctions-7.exs:3: undefined function __FILE__/0
(elixir) expanding macro: Kernel.to_string/1
ModulesAndFunctions-7.exs:3: (file)
您只需使用即可将您的答案更新为:
\uuuuu环境文件
请?