I'm trying to make a simple iteration process in Julia (language that I just began to learn) and I'm having some troubles. I want to evaluate the expression x > 0 && x <= 3 for values ranging from 0 to 3 in order to see when condition is true. I've tried so many ways and I can't find something in documentation which could help me. This is the code I just made (I tried many other combinations) but it's still not working:
x = [0,1,2,3]
for i in x
if x > 0 && x <= 3 == true
println("true")
else
println("false")
end
I'm getting this message error:
syntax: incomplete: "for" at In[29]:3 requires end
Stacktrace:
[1] include_string(::String, ::String) at .\loading.jl:522
Any help will be much appreciated.