Integrated Application Platform › Forums › General › [SOLVED]Does suneido support referenced variables? › Re: Re: Does suneido support referenced variables?
August 13, 2014 at 2:08 am
#1069
Participant
j_ferguson: Thanks for the clarification. So its only for object type in this case, not for other types. I created a function,
function (text)
{
if Object?(text)
text[0] = 'hi suneido'
}
And I executed following code in Workspace,
txt1 = 'hello suneido'
ob = Object(txt1)
ChangeText(ob)
Print(ob[0])
Everything works as expected. But as you can see, I had to pack the variables into an object and that causes quite some additional thinking/typing. It would be nice to be just
function (ref text)
{
text = 'hi suneido'
}
txt1 = 'hello suneido'
ChangeText(txt1)
Print(txt1)
Anyway, its just an idea. For now, I guess the first option is the way to go.
Thanks a lot