It is known that we cannot clear a variable after set them. However is it possible to change a decleared variable? For example:
a::Int16=1001;
Then what ever we set:
a=nothing
or
a=1.000001
will both receive
InexactError: Int16(1.0001)
Stacktrace:
[1] Int16
@ .\float.jl:767 [inlined]
[2] convert(#unused#::Type{Int16}, x::Float64)
@ Base .\number.jl:7
[3] top-level scope
@ In[6]:1
[4] eval
@ .\boot.jl:368 [inlined]
[5] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
@ Base .\loading.jl:1428
Therefore, could we change type of a, then redefine it?