hey everyone! I tried defining variables of particular Type in this script. They don't work in the "normal mode" but they run in functions properly. To explain the problem, here is a code snippet from a file "type_test.jl" which I invoked by typing "julia type_test.jl" in the terminal.
function foo()
a::Int8 = 10
b::Int8 = 20
a + b
end
foo()
x::Int8 = 10
y::Int8 = 20
x + y
There shows an error that x is not defined. Can please someone explain this
kind of behavior ?
Regards,
Pranit Bauva
