mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 503
B
Bekar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
Code:
/* blah blah blah
blah */
alias test {
  echo -s got here
}

In an edit window, do /test, you'll get an 'Unknown command' error.

Ending a /* */ comment anywhere other than the first character of a line seems to not end the multi-line comment correctly. Causes anything after the comment to break.

I think this was there in v6.3 too.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Without checking, I don't think you could end the comment anywhere other than the beginning of a line for a long time (perhaps all of the time).


Invision Support
#Invision on irc.irchighway.net
Joined: Dec 2002
Posts: 503
B
Bekar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
With the ';' stuff, yeah.. Semi-colon is documented in the help file as being required at the start of a line, but the '/* */' style is listed as 'enclose text'.

Documentation change, sure, it'd be fine. Just the clarification would be nice wink

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I don't use that kind of commenting myself as it's much easier, imo, to see what is a comment when using ;'s on each line... still, I believe you can put */ at the end if it's the same line, otherwise it has to be at the beginning. It wouldn't hurt to have that in the help file, of course.


Invision Support
#Invision on irc.irchighway.net
Joined: Jun 2006
Posts: 508
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
You always had to use them at the beginning of a line.
Originally Posted By: versions.txt 29/08/2003 - mIRC v6.1

84.Can now use /* and */ to comment out multiple lines in an alias,
popup, or script. Each be used alone on a single line.
There's some text missing, but the help file shows
Originally Posted By: /help comments
/*
This is a comment
*/

That's how they've always worked...

Note that it also states multiple lines in versions.txt.

Last edited by deegee; 02/11/07 10:54 AM.
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
As far as I know it's by design. It's necessary really since mIRC doesn't use quotes around strings, otherwise you could end up with */ appearing anywhere in what was supposed to be an argument to a command that gets treated as the end of the comment, leading to bugs. ie.
Code:
/*
echo -a */ This is all meant to be text */
echo -a this is meant to be commented out too
*/



Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Think about the popular "if ( /* !iswm $1 ) for on input events. Well, it's inside an if condition, but mirc would need to parse alot more code...

edit: ...beaten whistle

Last edited by Horstl; 02/11/07 02:01 PM.

Link Copied to Clipboard