mIRC Home    About    Download    Register    News    Help

Print Thread
Nested while loops bug #199690 19/05/08 06:58 PM
Joined: May 2007
Posts: 37
C
Chessnut Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: May 2007
Posts: 37
Apologies if this has been pointed out before, I'd be very surprised if it hasn't been, but I wasn't able to find it with a forum search.

The bug is with nested while loops on the same line of code. The following script fails when executed on a single line (terminates after the first iteration), but succeeds when spread out onto multiple lines:

Code:
alias test var %s 3 | while (%s) { var %a 3 | while (%a) { dec -s %a } | dec -s %s }


Fails, whereas:

Code:
test2 {
  var %s 3 
  while (%s) {
    var %a 3
    while (%a) {
      dec -s %a
    }
    dec -s %s 
  }
}


works as expected.

mIRC Version: 6.31

Re: Nested while loops bug [Re: Chessnut] #199691 19/05/08 07:15 PM
Joined: Jul 2006
Posts: 3,582
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,582
I'm sure i've seen a post concerning this bug, maybe not in "bug reports".


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Nested while loops bug [Re: Chessnut] #199696 19/05/08 07:29 PM
Joined: Dec 2002
Posts: 2,013
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,013

Although I can't find it now because of a limit on search results, this has been reported and is known by Khaled. It's annoying that I couldn't find the thread because I was involved in the thread, but now it will only return max 100 results it seems. I don't think it's always been that way.

Re: Nested while loops bug [Re: RoCk] #199705 20/05/08 12:40 AM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
Two different threads...


Invision Support
#Invision on irc.irchighway.net
Re: Nested while loops bug [Re: Riamus2] #199706 20/05/08 02:29 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Three if you count the original post referenced in the second link


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: Nested while loops bug [Re: argv0] #199709 20/05/08 03:07 AM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
Oops, missed that link.


Invision Support
#Invision on irc.irchighway.net
Re: Nested while loops bug [Re: Chessnut] #199720 20/05/08 12:59 PM
Joined: May 2007
Posts: 37
C
Chessnut Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: May 2007
Posts: 37
My bad, I didn't search for topics older than 3 years (didn't realise it had been an issue for so long).

Last edited by Chessnut; 20/05/08 01:01 PM.
Re: Nested while loops bug [Re: Chessnut] #199732 20/05/08 04:52 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
No problem. I was just linking to them so people could read up on what was said already. Not in complaint of not searching or anything like that. smile

I swear there was something more recent, though... within the past 6 months. Oh well.


Invision Support
#Invision on irc.irchighway.net
Re: Nested while loops bug [Re: Chessnut] #199735 20/05/08 05:34 PM
Joined: Jan 2004
Posts: 162
R
RRX Offline
Vogon poet
Offline
Vogon poet
R
Joined: Jan 2004
Posts: 162
Originally Posted By: Chessnut
My bad, I didn't search for topics older than 3 years (didn't realise it had been an issue for so long).

bromvlieg told you!