Code: Select all
Option ByVal
declare sub more(s as string)
more("Less")
more("More")
end
sub more(s as string)
s = s+" is " + s
print s
end sub
Instead I see:Less is Less
More is More
It seems that the second call to more() doesn't update the string s with its new value. If I create a new variable to hold the bigger string:Less is Less
Less is Less
Code: Select all
sub more(s as string)
k$ = s+" is " + s
print k$
end sub
I assume there is some logical behavior I'm not understanding; briefly looking over the documentation for strings nothing jumped out at me. Does anyone have a better understanding of this?