Just a bump on this. I'm still curious how one would return more than a single value from a namespace. Is namespace copy the only real way?
Why not concatinate the results into a single #RESULT with a seperator then break them out to individual variables on the return?
gosub givemesomevars
str pos _ #RESULT
set %i #strRes
str left #RESULT %i - 1 ;(can I use the subtraction operator here like this or do I need to set a %tmp var first?)
set %Var1 #strres
str right #RESULT %i + 1 ;(same question as above)
set %Var2 #strres
Display %Var1 , _ , %Var2 ; should equal "Value1_Value2"
sub givemesomevars
namespace push
namespace local nsVars
set !Var1 Value1
set !Var2 Value2
set #RESULT !Var1 , _ , !Var2
namespace clear
namespace pop
return #RESULT
Is this correct? This seems cleaner than a namespace copy but what do I know? Also, looks reasonable for two return values but seems like it would get complex quickly!
X