Try
a = Ref(20000)
TestAdd(a)
println(a[])
Ref(a) has nothing to do with a, it creates a reference to the value of a not to the variable a.
Try
a = Ref(20000)
TestAdd(a)
println(a[])
Ref(a) has nothing to do with a, it creates a reference to the value of a not to the variable a.