TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Variables in aliases are passed by reference.

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
louipc



Joined: 16 Jul 2006
Posts: 65

PostPosted: Mon Oct 13, 2008 7:22 pm    Post subject: Variables in aliases are passed by reference. Reply with quote

Code:
#var bar foo
#fun getbar {#var result $bar}
#ali what {#var bar oops;#show {%0}}
what $bar
oops
#var bar foo
what @getbar{}
oops


I would have expected output to be "foo"!
Perhaps this behaviour is intentional but it really caught me off guard.
So if this isn't a bug, at least it's a heads up.
Even trying to get the value with a function ends up with the same behaviour.
Is there a way to pass by value between aliases and functions?

Cheers Bye
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3844

PostPosted: Tue Oct 14, 2008 9:03 am    Post subject: Reply with quote

If your session name is 'bob' you could use: #bob what $bar

But I guess I could substitute alias/function arguments, I'll add it to the todo list.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group