I want to place “using JuMP” inside a function as follows
function test()
using JuMP
...
end
However, it gives an error syntax: "using" expression not at top level
, is there a way to work around it?
I want to place “using JuMP” inside a function as follows
function test()
using JuMP
...
end
However, it gives an error syntax: "using" expression not at top level
, is there a way to work around it?
you need to make a module instead
Why do you need to do this?
Here you might find your answer: Frequently Asked Questions · The Julia Language