a
is a global variable in the REPL and must be annotated inside the loop as such, to avoid this, insert your code inside a function. See this discussion for more information: REPL and for loops (scope behavior change).
julia> function test()
a = 1.0
b = 1.0
e = 0.1
for i in 1:5
x = a - e*b
y = b + e*a
println(i," “,x,” ",y)
a = x
b = y
end
end
test (generic function with 1 method)
julia> test()
1 “,x,” 1.1
2 “,x,” 1.1900000000000002
3 “,x,” 1.2690000000000001
4 “,x,” 1.3361
5 “,x,” 1.3905100000000001