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


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: 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... ;)
Reply with quote
hogarius
Adept


Joined: 29 Jan 2003
Posts: 221
Location: islands.genesismuds.org

PostPosted: 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.
Code:
Reply with quote
Zugg
MASTER


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

PostPosted: 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.
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