Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
atpeace
Novice


Joined: 26 Jan 2009
Posts: 32

PostPosted: Mon Jan 26, 2009 1:17 pm   

%expand() is not aware of local variables
 
#NEWVAR zuggsoft "Zugg's virtual home."
#NEWVAR email "zugg@zuggsoft"
$Local = @email
#SHOW with expand: %expand(@email,1)
#SHOW with expand: %expand($Local,1)
#SHOW $Local

Output:
with expand: zugg@zuggsoft
with expand: $Local
zugg@zuggsoft
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Jan 26, 2009 6:01 pm   
 
Added to bug list. Although as you see, you shouldn't really need %expand with local variables since CMUD doesn't do recursive expansion like zMUD did. By putting the "zugg@zuggsoft" within double-quotes, you are telling CMUD that this is a literal string, which is what prevents the @zuggsoft from being expanded like it did in zMUD.
Reply with quote
atpeace
Novice


Joined: 26 Jan 2009
Posts: 32

PostPosted: Mon Jan 26, 2009 7:35 pm   
 
Ah noted, though the problem was really generated for me by trying to expand named parameters that contained arguments that needed evaluation. I could have continued to use %1...%99 but thought you'd like to know.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
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

© 2009 Zugg Software. Hosted by Wolfpaw.net