>From the manual
Argument Passing Behavior: ...means that values are not copied when they 
are passed to functions. ...Modifications to mutable values (such as 
Arrays) made within a function will be visible to the caller. 

I get
julia> function f(x)
       x=x+1
       y=x+1
       end
f (generic function with 1 method)

julia> x=[1:5]'
1x5 Array{Int64,2}:
 1  2  3  4  5

julia> y=f(x)
1x5 Array{Int64,2}:
 3  4  5  6  7

julia> x
1x5 Array{Int64,2}:
 1  2  3  4  5

Apparently Array x is copied inside the function, at least in this case, 
and this is not visible to the caller (here made indirectly visible). The 
manual is confusing for me. And what is the difference between my example 
and the double! function from the manuals style guide, which does actually 
modify the function argument?

Reply via email to