How can I import a module in another module in same file in julia ??
I actually read.
But I wanted to know that , is there a way to import module a in moduleb without using include.
The very first example in the section I linked is about this.
Also, please post quoted code.
In that example
module Parent contains
module Utils so we can use
using for importing
Utils directly . But In my example
module b does not contain
module a but are in same file
new.jl so if I use
using .a it does not work.
Why not just wrap both modules in a module? A .jl file usually contains one module, but that module can have multiple submodules.
PS: Module names are usually uppercase.
@EricForgy are you asking to make a new
module(say C) which contains both the module or nesting
module A inside
module B (like in example given in documentation)???
Either way would be fine. It is up to you
From your question, it seems you don’t want them nested so you could do something like:
module C module A end module B using ..A end end