mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2011
Posts: 448
K
KindOne Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
K
Joined: Feb 2011
Posts: 448
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 
}


Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
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.

Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
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.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Oct 2003
Posts: 3,918
A
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"
Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
Thanks this issue has been fixed for the next version.


Link Copied to Clipboard