Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Tue Aug 28, 2012 2:41 am   

[3.34 BUG] Comments and aliases
 
Commenting out lines that run an alias doesn't seem to work, the alias still gets called (it does work if you put a space after the //). Simple example:
Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <alias name="test" copy="yes">
    <value>#print "test alias fired"</value>
  </alias>
  <alias name="test2" copy="yes">
    <value>//test</value>
  </alias>
</cmud>


The single line in test2 is commented out, nothing should happen when it is run, but it calls the test alias and prints test alias fired.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Aug 28, 2012 3:37 am   
 
Confirmed, and quite curious about the real situation that brought this up. Laughing
_________________
EDIT: I didn't like my old signature
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Aug 28, 2012 12:57 pm   
 
I think comments have always required a space after the "//". I never thought of that as a bug, but I suppose it probably should be.
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Tue Aug 28, 2012 11:27 pm   
 
No real interesting story about what brought it up... I tried to comment out an alias, and it didn't work :P And comments work without a space normally, so it's definitely not required. I did a quick search through the help and didn't find anything about commenting, so I can't say for sure which is more correct.
Reply with quote
wrym
Magician


Joined: 06 Jul 2007
Posts: 349
Location: The big palace, My own lil world

PostPosted: Thu Aug 30, 2012 2:11 pm   
 
This is not a bug, leading // are used for absolute variable reference. I can't find where Zugg introduced it, but Matt you brought this up in this thread http://forums.zuggsoft.com/forums/viewtopic.php?t=37100&highlight=variable+reference

This could be confusing new cmud scripters, and maybe a special comment should be made somewhere in the help files.
_________________
"To the engineer, all matter in the universe can be placed into one of two categories: (1) things that need to be fixed, and (2) things that will need to be fixed after you've had a few minutes to play with them" - Scott Adams, The Dilbert Principle
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Thu Aug 30, 2012 2:26 pm   
 
Ahhh, of course, I should have thought of that. Commenting out aliases works fine if it's not in the root of the window. I suppose the real issue here is that Zugg decided to use // for two different things. Why, I have no idea.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Thu Aug 30, 2012 3:33 pm   
 
the // follows the standard nomenclature for extended path names
_________________
Discord: Shalimarwildcat
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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