How to import custom module in julia

后端 未结 7 2176
抹茶落季
抹茶落季 2020-12-08 19:35

I have a module I wrote here:

# Hello.jl
module Hello
    function foo
        return 1
    end
end

and

# Main.jl
using Hel         


        
7条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-08 19:48

    Unless you explicitly load the file (include("./Hello.jl")) Julia looks for module files in directories defined in the LOAD_PATH variable.

    See this page.

提交回复
热议问题