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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Sun Jul 06, 2008 2:06 am   

is this expression possible: (@{$rt}Chk($a))
 
#IF (@{$rt}Chk($a)) {}

That is to say, I want to check a function, where the function name is the value of $rt with Chk appended.

CMUD doesn't like it though, it will not compile.
_________________
Athlon 64 3200+
Win XP Pro x64
Reply with quote
Arde
Enchanter


Joined: 09 Sep 2007
Posts: 605

PostPosted: Sun Jul 06, 2008 5:44 am   
 
@{%concat(%concat(%concat($rt, "Chk("), $a), ")")} Question
_________________
My personal bug|wish list:
-Wrong Priority when copy-paste setting
-1 prompt trigger for Mapper, Session and General Options, not 3 different!
-#SECTION can terminate threads
-Buttons can't start threads
Reply with quote
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Mon Jul 07, 2008 12:19 pm   
 
Thankyou, yes. That worked, though it seems a little bit klunky. I wish there was a neater way, but it should do the trick just fine, thanks :)
_________________
Athlon 64 3200+
Win XP Pro x64
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Jul 07, 2008 2:31 pm   
 
Why not:
@{%concat($rt, "Chk(", $a, ")")}
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Jul 07, 2008 3:13 pm   
 
Rahab's is much better. The major thing to remember is that the braces {} in the @{} syntax need to have the whole variable name inside, not just part of it.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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