Why does Julia think a vector is a string?

Quoting from Please read: make it easier to help you. You don’t have to post whole source codes. It’s best to give us a self-contained minimal working example so we can reproduce your error. I believe people reading your post doesn’t understand several things:

  1. the process of defining S
  2. what function is pop() (because it accepts no argument) in julia we have the method pop!()
  3. what function is jacli()

and it’s best to write your code in the triple-backticks. lastly, doing an addition of Vector{Int64} to another Vector{Int64} still results a Vector{Int64} the last time I checked.


julia> x = [1,2,3]
3-element Vector{Int64}:
 1
 2
 3

julia> y = [4,5,6]
3-element Vector{Int64}:
 4
 5
 6

julia> +(x,y)
3-element Vector{Int64}:
 5
 7
 9

Edit: I see you’ve edited the post @dgpdx to give an explanation, but still I haven’t yet understand what happened

1 Like