The following code fails.
global Θ=1.0
function f(a)
c=sin(a+θ)
return c
end
f(1)
UndefVarError: θ not defined
Stacktrace:
[1] f(a::Int64)
@ Main ./In[1]:3
[2] top-level scope
@ In[1]:6
[3] eval
@ ./boot.jl:373 [inlined]
[4] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
@ Base ./loading.jl:1196
It has no reason to fails.
Why this is incorrect??
If this doesn't work, I can say that people can't do anything using Julia.