坑瀑布
# no error, even the subscript is out of range.
julia> sub2ind((3,3), 3, 4)
12
通過比較索引,無法確定下標是否在陣列範圍內:
julia> sub2ind((3,3), -1, 2)
2
julia> 0 < sub2ind((3,3), -1, 2) <= 9
true
# no error, even the subscript is out of range.
julia> sub2ind((3,3), 3, 4)
12
通過比較索引,無法確定下標是否在陣列範圍內:
julia> sub2ind((3,3), -1, 2)
2
julia> 0 < sub2ind((3,3), -1, 2) <= 9
true