# Argument Passing Problem in Julia Version 0.6.0

**URL:** <https://discourse.julialang.org/t/argument-passing-problem-in-julia-version-0-6-0/5095>\
**Category:** General Usage\
**Tags:** question\
**Created:** [July 27, 2017, 3:16pm UTC](https://discourse.julialang.org/t/argument-passing-problem-in-julia-version-0-6-0/5095 "2017-07-27T15:16:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gopal2017](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gopal2017/32/31747_2.png) [@gopal2017](https://discourse.julialang.org/u/gopal2017)\
**Post date:** [July 27, 2017, 3:16pm UTC](https://discourse.julialang.org/t/argument-passing-problem-in-julia-version-0-6-0/5095/1 "2017-07-27T15:16:21Z")

</div>

Hello,  
I faced a strange problem. My code is working well in Julia Version 0.5.2 but facing problem in Julia 0.6.0. For sake of simplicity, I am giving small code mentioned below:  
function s(x)  
A1=AbstractString  
for i=1:x  
push!(A1,“$i”)  
end  
B1=AbstractString  
B1=deepcopy(A1)  
return A1,B1  
end  
Julia\>T,S=s(10)  
It is working well. If I am using the same logic for large problem then I am getting few issues. Function is generating few AbstractString and returning it to few variables. Within the function length of the AbstractString \>0 . If we modify the stated function further as T,S=function!(arg1,arg2,…;t1=t1) where t1=false then we got T and S as empty AbstractString. The code and logic is Ok and working for Julia 0.5.2 but not for 0.6.0.Why T and S empty?

---

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [July 27, 2017, 3:38pm UTC](https://discourse.julialang.org/t/argument-passing-problem-in-julia-version-0-6-0/5095/2 "2017-07-27T15:38:34Z")

</div>

It’s unclear what you are actualy asking about. Your simplified code works just fine and you didn’t say what’s `function!`, `t1`, `arg1`, `arg2`.

FWIW, the `B1=AbstractString[]` line is doing nothing good.

---

<div class="post-metadata">

**Author:** ![gopal2017](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gopal2017/32/31747_2.png) [@gopal2017](https://discourse.julialang.org/u/gopal2017)\
**Post date:** [July 28, 2017, 1:02pm UTC](https://discourse.julialang.org/t/argument-passing-problem-in-julia-version-0-6-0/5095/3 "2017-07-28T13:02:43Z")

</div>

Ok. In layman word, t,x=s(2)  
We will get value of t and x as per the logic of s(x). If we use isimmutable(s) then you will get true. if we use pointer\_from\_objref(s) then we will get void pointer. Question arises about the approach Julia version is using to return value to any variable. If t,x=s(2) then first array of AbstractString assigned by s to t should be by Ref. For some reason entire logic of the function can’t be given.

---

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [July 28, 2017, 1:30pm UTC](https://discourse.julialang.org/t/argument-passing-problem-in-julia-version-0-6-0/5095/4 "2017-07-28T13:30:36Z")

</div>

> [@gopal2017](#):
>
> If we use isimmutable(s) then you will get true. if we use pointer\_from\_objref(s) then we will get void pointer

How are these related at all?

> [@gopal2017](#):
>
> If t,x=s(2) then first array of AbstractString assigned by s to t should be by Ref.

`s` never assign anything to `t` the caller assigns it.

> [@gopal2017](#):
>
> For some reason entire logic of the function can’t be given.

What logic?
