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
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Wed Dec 06, 2006 8:21 pm   

Escape character to prevent quotes from evaluating?
 
If I have a variable such as:

#var myvar {This is "a sample" line.}

Is there a way to escape the quotes so that they do not evaluate to this:

This is a sample line.

So I can't do thing properly like #if(@myvar == "This is "a sample" line.") properly.

I've tried \ and ~ and " but nothing seems to escape this so it doesn't evaluate. I'm assuming if I can find the appropriate character I can do a simple subregex to escape the characters.
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Wed Dec 06, 2006 8:41 pm   
 
try using
#var myvar {This is ~"a sample~" line.}
to set the value

and
%quote(@myvar)
to use it later
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Wed Dec 06, 2006 9:59 pm   
 
That work, thanks!
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