|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Sun Apr 29, 2007 3:55 pm
[1.30] invalid local variable: asd |
At the command input
#say $asd
results in
invalid local variable: asd
Which is correct, as there is no local variable $asd when entered by itself at command input - but maybe CMUD could be smarter about detecting that I wanted to send a dollar sign in this instance? |
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
|
hogarius Adept
Joined: 29 Jan 2003 Posts: 221 Location: islands.genesismuds.org
|
Posted: Sun Apr 29, 2007 4:12 pm |
Guinn, I have to disagree with you on this one.
Consider the following:
Code: |
$asd=x+y+z;#say $asd |
In this case, you'd likely want the value of the local variable $asd generated on the screen.
I understand you have a case where the #say command is the only command input, but I'm not convinced that's enough of an exception to make Zugg make the parser work in a more convulted fashion.
I would suggest sometimes we have to be smart enough to remember that if we want to #SAY literal text, especially including words that begin with punctuation, that we enclose the text in quotes.
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Apr 30, 2007 5:13 pm |
Hogarius is correct...I'd like to see people start using quotes more consistently, just like you have to with other programming languages. Or at least realize that $ is now a "special character" and might need to be escaped, just like with # or ; or other special characters.
|
|
|
|
|
|