That is acutally hilarious and the most tricky mistake I have seen.
Dne středa 25. května 2016 5:56:33 UTC+2 Po Choi napsal(a):
>
> julia> a = zeros(3)
> 3-element Array{Float64,1}:
> 0.0
> 0.0
> 0.0
>
> julia> a[2+1]
> 0.0
>
> julia> a[2 + 1]
> 0.0
>
> julia> a[2+ 1]
> 0.0
>
> julia> a[2 +1]
> ERROR: MethodError: `typed_hcat` has no method matching
> typed_hcat(::Array{Float64,1}, ::Int64, ::Int64)
> Closest candidates are:
> typed_hcat(::Type{T}, ::Number...)
> typed_hcat(::Type{T}, ::Any...)
>
> julia> a[(2 +1)]
> 0.0
>
>
>
>