On Wed, 2014-07-23 at 16:29, Stefan Karpinski <[email protected]> wrote:
> Main is the root module so /T and ./T are the same thing in Main.

but doesn't the same hold for any other "folder"?

   /MyMod/T and /MyMod/./T are the same thing

> On Wed, Jul 23, 2014 at 3:36 AM, Mauro <[email protected]> wrote:
>
>> It still needs relative imports with one dot:
>>
>> julia> module A
>>        module B
>>        foo()=4
>>        export foo
>>        end
>>        using .B
>>        foo()
>>        end
>>
>> Which is a bit odd.  Because at the REPL, which is in module Main, this
>> is not needed.  This both works:
>>
>> julia> module T
>>        end
>>
>> julia> using .T
>>
>> julia> module U
>>        end
>>
>> julia> using U
>>
>> Does anyone know why this difference is?
>>
>>
>> On Wednesday, July 23, 2014 5:56:08 AM UTC+1, ggggg wrote:
>>>
>>> Ok I see how that works, I wasn't aware of the ..C syntax. That solves
>>> the problem asked about, but I'm left with another question. Take for
>>> example
>>>
>>> module A
>>> module B
>>> foo()=4
>>> export foo
>>> end
>>> foo()
>>> end
>>>
>>> That doesn't work, I get "ERROR: foo not defined" because foo is not
>>> actually in the A namespace. But if I add "using B" I get "ERROR: B not
>>> found". So how do I define B inside A, but also have A import the things
>>> that B exports?
>>>
>>>
>>>>

-- 

Reply via email to