I would like to create a module file “defs.jl” that contains definitions of several constants such a grid size, dimensionality etc. To do so I have created the following module file:
defs.jl
module defs
export D
const D=2 # dimension
end
and import it in my code using the command “include(”./defs.jl")".
My problem is that in order to get the value of D I have to type “defs.D” instead of directly D even though D is exported. I tried using “using defs” but that results in an error “Module defs not found in current path.”
Thanks!