-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linking .jl script in another .jl script. #4086
Comments
What version of Julia are you using? With the current |
Dup of #265? |
Shouldn't be, I tried this on my computer and it works just fine. |
In a situation like this |
@JeffBezanson ...Well sir, its working now, by declaring 'require' and 'reload' function before the function delaration, problem has been solved. |
Changes to top-level definitions only take effect for code starting from the top-level, not for currently-executing code inside a function. |
Thankx @JeffBezanson ... |
If you can port the current codebase to Julia, it will be great to see how well it performs with Julia. |
Actually, the program composes a fusion of Simulink and couple of .m files. |
Not sure how that would work, as I have no experience with simulink. |
ok..but any idea of linking .m file to julia.... |
I'm not quite sure if it's what you're asking for, but check out @lindahua's https://github.com/lindahua/MATLAB.jl. |
Well, its just been a couple of days, I started using Julia. It might be a silly question, but unable to solve on my own.
File name : mee.jl
function mem(k)
k*10
end
File name : a.jl
function man(val)
require("mee.jl")
reload("mee.jl")
k = mem(val)
print(k)
end
executing require("a.jl") and then man(20) yeilds 200 as desired. But suppose, I change mee.jl function(2nd Line) as k*40 and save it.
Now, executing reload("a.jl") and then man(20) should yeild 800, but it doesn't, it still yeilds 200???
Is it a mistake which I am making in the execution process/Coding?
The text was updated successfully, but these errors were encountered: