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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
newby
Newbie


Joined: 27 Oct 2003
Posts: 4
Location: USA

PostPosted: Mon Oct 27, 2003 4:05 pm   

Treat variable as operator
 
Is there a way to treat a variable as an operator?
I assigned +,-,*,/ to a list but if I use them they are treated as strings instead of an operator.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Oct 27, 2003 5:09 pm   
 
Use %eval:
%eval(%concat("5 ", @operator, " 7"))
Reply with quote
newby
Newbie


Joined: 27 Oct 2003
Posts: 4
Location: USA

PostPosted: Mon Oct 27, 2003 5:20 pm   
 
That worked!Thanks a lot for the quick response!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion 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