alex.readcol() should work. Or alternatively export readcol from alex: modul Alex export readcol readcol() = 5 end
The 'include' essentially just pasts the code of the file. That's why doing the include at the promt works, as then readcol is introduced into the top-level module (which is what you're in at the prompt) On Tue, 2015-01-27 at 11:19, alex codoreanu <[email protected]> wrote: > Hi guys, > > I'm a new user, 1st week :) and I am having trouble properly accessing > some functions that I built. One of them is akin to IDL's readcol.pro. > > My module definition for alex.jl > > *module alex* > > *include("/Users/alex/CODES/Julia_Custom_jl/alex/src/readcol.jl")* > *println("alex_module_loaded")* > > *end* > > After > > *julia> **using alex* > > alex_module_loaded > > > *julia> **readcol()* > > *ERROR: readcol not defined* > > the path and include is correct > > *julia> **include("/Users/alex/CODES/Julia_Custom_jl/alex/src/readcol.jl")* > > *readcol (generic function with 1 method)* > > so it looks like it might be a scope issue. I basically want to have access > to readcol() after loading my custom module. > > Thank you.
