Problems when comparing Int16 and Int64

Hello,
why did this happen?

julia> Int16(200) == 200
true

julia> Int16(200) !== 200
true

== and === mean different things in Julia.

Maybe this will help, count the number of characters in each one.

julia> Int16(200) == Int64(200)
true

julia> Int16(200) === Int64(200)
false

julia> Int16(200) != Int64(200)
false

julia> Int16(200) !== Int64(200)
true
5 Likes

exactly, just a syntax error)

1 Like