|
gmueller Apprentice
Joined: 06 Apr 2004 Posts: 173
|
Posted: 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) |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: 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 |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: 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.
|
|
|
|
gmueller Apprentice
Joined: 06 Apr 2004 Posts: 173
|
Posted: 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 |
|
|
|
|
|