Quantcast
Channel: First steps - JuliaLang
Viewing all articles
Browse latest Browse all 2795

Export from a submodule

$
0
0

@Isaia_Nisoli wrote:

Dear all,
I trying to solve this issue, but to no avail.

I have the following module structure

Module Foo

Module Bar
export f
f(x, y) =x+y
end

using .Bar

end

I would like the function f to be visible in the REPL when I do using Foo.
I’ve tried by putting using .Bar, but to no avail.
The only way I have to access this function is Foo.Bar.f, but I would like it to be simply f.

Best wishes
Isaia

Posts: 3

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 2795

Trending Articles