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
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Sun Apr 27, 2008 5:38 pm   

No way to escape special characters % and & in %format
 
There doesn't appear to be any way to escape the special characters % and & within the format string.
I tried
Code:
#echo %format("Name && Number [&s:&s]","James","007")
#echo %format("Name %& Number [&s:&s]","James","007")
#echo %format("Name ~& Number [&s:&s]","James","007")


This holds true for the % char as well.
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Sun Apr 27, 2008 7:49 pm   
 
Albeit a bit clunky, this does work:

#show %format("&s &s &s [&s:&s]","Name","&","Number","James","007")

*shrug* But yeah, it'd be nice to be able to escape the & and % within the first parameter.

Charneus

EDIT: Even better:

#SHOW %format("Name &s Number [&s:&s]","&","James","007)

*smirk*
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Sun Apr 27, 2008 7:54 pm   
 
Good show!
Thanks for the work-around
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
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