Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

comment [2016/08/23 17:04] (current)
Line 1: Line 1:
 +__comment__ [<​anything>​]
 +The comment command does nothing.  ​
 +It is important to understand that the comment command is a proper command, and follows the rules for ircII syntax.  ​
 +You can create a multi-line comment by surrounding it in curly braces
 +   ​comment {
 +      This is a multi line comment
 +      Isn't that neat?
 +   }
 +The comment command is also known as : (colon). ​ Remember that in ircII, command names are not limited, so yes, the colon is itself a proper command, and is the comment command
 +    : {
 +        This is another multi-line comment
 +        This is so much less hacky than the old C-style comments!
 +    }
 +It is helpful to contrast the comment command (which is a proper ircII command) from the #-comment.
 +The #-comment is a [[load]] time thing.  ​
 +#-comments are discarded by [[load]] and do not become part of the script when it is run.
 +#-comments __do not__ support multi-line comments (as above), and they end at the end of the line.
 +For this reason, #-comments are better for commenting out real code
 +The comment command __is__ retained by [[load]] because it is a full blown command and is part of the ircII syntax.  ​
 +This means that comment commands are parsed each time they are encountered,​ which means you don't want to use them inside of aliases (they would slow the alias name).
 +The standard [[load]]er supports C /* */ multi-line comments, but that is for backwards compatability.
 +They should not be used in new code.  Use the examples above instead.
comment.txt ยท Last modified: 2016/08/23 17:04 (external edit)