a default module name?

43 views
Skip to first unread message

Ryan Gardner

unread,
Oct 26, 2016, 3:27:50 PM10/26/16
to julia-users
say I have code:


type foo
   a
end

module MyModule
   #how do I use foo here?
   #can I
   import <something>.foo
   #??
end

There must be a way to use global types in modules.  Is there a name for the "global module" (if you will).  Thanks.

Ryan Gardner

unread,
Oct 26, 2016, 3:46:06 PM10/26/16
to julia-users
Oh, Main

import Main.foo

Thanks.

Yichao Yu

unread,
Oct 26, 2016, 4:05:04 PM10/26/16
to Julia Users
On Wed, Oct 26, 2016 at 3:46 PM, Ryan Gardner <rwga...@gmail.com> wrote:
> Oh, Main
>
> import Main.foo


import ..foo
Reply all
Reply to author
Forward
0 new messages