A strange error

a simple program:
ss=0
println(ss," <<<<<<<< “)
for k in 3:2:20
print(k,” “)
ss=ss+k
println(ss,” ")
end
… creates no solution, but this error:
┌ Warning: Assignment to ss in soft scope is ambiguous because a global variable by the same name exists: ss will be treated as a new local. Disambiguate by using local ss to suppress this warning or global ss to assign to the existing global variable.
└ @ c:\Users\Besitzer\Documents\Matlab\Saturn\test.jl:20
3 ERROR: LoadError: UndefVarError: ss not defined in local scope
Suggestion: check for an assignment to a local variable that shadows a global of the same name.
Stacktrace:
[1] top-level scope
@ c:\Users\Besitzer\Documents\Matlab\Saturn\test.jl:20
[2] include(mapexpr::Function, mod::Module, _path::String)
@ Base .\Base.jl:307
[3] top-level scope
@ REPL[3]:1
in expression starting at c:\Users\Besitzer\Documents\Matlab\Saturn\test.jl:18
----------- what is wrong?

Well it’s mostly in the error message you posted:

Warning: Assignment to ss in soft scope is ambiguous because a global variable by the same name exists: ss will be treated as a new local. Disambiguate by using local ss to suppress this warning or global ss to assign to the existing global variable.

In this case, if you want the loop to work with a global variable, you can write

ss=0
println(ss," <<<<<<<< ")
for k in 3:2:20
    print(k,” “)
    global ss=ss+k
    println(ss,” ")
end

There’s some helpful reading here in the documentation: Scope of Variables · The Julia Language