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
gmueller
Apprentice


Joined: 06 Apr 2004
Posts: 173

PostPosted: Fri Jul 06, 2007 8:00 am   

[1.34] %quote() bug
 
$temp = %quote(%line)
#SAY $temp
result: ~%line

I guess I can kinda see why....

$temp = %line
%quote($temp)
#SAY $temp

result: 0

$temp = %line
$temp = %quote(%eval($temp))
#SAY $temp
result: ~%eval($temp)
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Fri Jul 06, 2007 4:00 pm   
 
What you are looking for is this.

#show ~"The big fat cat.~"
$temp=%quote(%{line})
#say $temp
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Zugg
MASTER


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

PostPosted: Fri Jul 06, 2007 5:05 pm   
 
Actually, I think you are right that this is a bug. When I looked at the definition of %quote in CMUD, the argument was marked as a "literal" argument, and not a "string" argument. So, CMUD wasn't parsing the argument at all...it was just taking it as a literal string value. I have changed this for v2.0.
Reply with quote
gmueller
Apprentice


Joined: 06 Apr 2004
Posts: 173

PostPosted: Fri Jul 06, 2007 7:46 pm   
 
yeah I was thinking that was the reason...

The thing that confused me though was how it reacted in case 2. It was %quote($temp) I was thinking that if it were thinking it was a literal than it should have put either a $temp or a ~$temp on the screen (depending on if $ is now a special character)

So it looks like there is a little bit of an undefined behavior going on there too... but I'm not sure
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