Hi all, 

Is this a bug or a feature?

julia> idx = [1:10]
10-element Array{Int64,1}:
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10

julia> idx .!= 2 & idx .!= 8
10-element BitArray{1}:
  true
 false
  true
  true
  true
  true
  true
  true
  true
  true

which appears wrong to me. However, by wrapping the two conditions by 
parenthesis:

julia> (idx .!= 2) & (idx .!= 8)
10-element BitArray{1}:
  true
 false
  true
  true
  true
  true
  true
 false
  true
  true

which is the expected result. I would expect the two cases to give the same 
result, or at least, for the first one, to emit a sort of warning.

Davide

Reply via email to