Dear all,
I am new, so many things could be different than Matlab or any other C,C++,Fortran language here. But I experienced a weird behaviour. My script B.jl starts by including a function found in another script A.jl which implements 2 functions one calling the other. I usually run it from REPL by:
Julia > include("B.jl")
and then A.jl together with other scripts are called from B.jl returning results at the end of the day in a nice table. I could go more into what packages I am “using” but I think that the problem is more Julia-related and not package-related. I do hope I am wrong by the way and the problem is package related.
What happens unfortunately is that B.jl is using the very first version of A.jl, and does not understand the edits I did since the first run. Was it because at some point I ran it from the command line and not the REPL? In order to get correct results, compatible with my edits to A.jl, I had to rename A.jl to Anew.jl rename the function inside Anew.jl accordingly, and to be on the safe side, I also renamed B.jl to Bnew.jl. Then it worked and a @printf command was finally printing a message proving me that it was really compiled.
By the way from REPL I could call
Julia> include("A.jl")
Julia> x=5.0; myAfun(x)
and get correct answer. No problem there. I was hoping that the same is true when my A.jl is called from another script by the include(“A.jl”) directive. It seems this is not the case. What am I doing wrong? Every other language works like this. What is wrong with Julia or is it the packages I am “using” doing something weird for running benchmarks?