mIRC Home    About    Download    Register    News    Help

Print Thread
$& in a commented line causes ident in next line. #240431 02/02/13 10:19 PM
Joined: Feb 2011
Posts: 311
K
KindOne Offline OP
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Feb 2011
Posts: 311
Having "$&" in a commented line causes the script editor to indent the next line.

I think this is wrong since the next line is a comment line and the script editor is not suppose indent the next line.

Code:
alias zzz { 
  echo -ag testing 
  ; this is a comment $& 
    echo -ag I think this is not suppose to be indented 
}

alias yyy { 
  echo -ag testing 
  ; this is a comment  
  echo -ag this is a comment 
}



irc.swiftirc.net #msl (mIRC Scripting Language)
Re: $& in a commented line causes ident in next line. [Re: KindOne] #240559 14/02/13 08:00 AM
Joined: Sep 2005
Posts: 2,876
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,876
I don't think it should indent, but it shouldn't treat the next line as a comment either. $& should have no meaning at all within a comment.

Re: $& in a commented line causes ident in next line. [Re: hixxy] #240563 14/02/13 08:27 PM
Joined: Jul 2006
Posts: 3,532
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,532
To clarify:
Originally Posted By: Kindone
I think this is wrong since the next line is a comment line and the script editor is not suppose indent the next line.
This is either wrong, or meant to be:
Quote:
I think this is wrong since the next line is NOT a comment line and the script editor is not supposed to indent the next line.


Originally Posted By: hixxy
I don't think it should indent, but it shouldn't treat the next line as a comment either. $& should have no meaning at all within a comment.
So yeah, mIRC doesn't treat the next line as a comment, it only indents wrongly because of the $&

Last edited by Wims; 14/02/13 08:28 PM.

Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: $& in a commented line causes ident in next line. [Re: Wims] #240613 18/02/13 08:47 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Agreed, the bug here is the aesthetic issue that the parser is seeing the $& without detecting the line as a comment and blindly indenting the next line-- the next line is not, and should not be a comment. The fix should be to simply ignore $& inside comment blocks.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: $& in a commented line causes ident in next line. [Re: KindOne] #241002 13/03/13 07:37 PM
Joined: Dec 2002
Posts: 4,488
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,488
Thanks this issue has been fixed for the next version.