invalid redefinition of constant in Juno. But works in terminal


#1

Hello!
I’m new in Julia, I worked mostly on Matlab. There is a strange problem for me in code:

When I type in Atom just this two lines:

Nk=199; 
sp=zeros(Nk);

I get mistake:

LoadError: invalid redefinition of constant sp
while loading …/Parameters.jl, in expression starting on line 2
include_string(::String, ::String) at loading.jl:522
include_string(::Module, ::String, ::String) at Compat.jl:174
(::Atom.##57#60{String,String})() at eval.jl:74
withpath(::Atom.##57#60{String,String}, ::String) at utils.jl:30
withpath(::Function, ::String) at eval.jl:38
macro expansion at eval.jl:72 [inlined]
(::Atom.##56#59{Dict{String,Any}})() at task.jl:80

But when I do this thing directly in terminal, it works without problem. What is it?


#2

There must be a function or constant named sp in the default Juno environment. Can you try just running

sp

to see what it is, and

?sp

to see its documentation (if it has any)?


#3

There isn’t.