mIRC Home    About    Download    Register    News    Help

Print Thread
#87907 23/06/04 04:07 PM
Joined: Jan 2003
Posts: 247
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Jan 2003
Posts: 247
There seems to be a bug in the reference of which loop to re-start when continue is used a second time in this code

Instead of jumping to the first while loop it goes to the second one when /continue is hit the second time.

Example Code:

Code:
   
alias test {
  var %0 = 9,%1 = 0
  while (%1 < %0) {
    inc %1
    echo == 1 ==
    if ($calc(%1 /2) != $int($calc(%1 /2))) { echo CONT | continue }
    echo == 2 ==
    var %2 = 5,%3 = 0
    while (%3 < %2) {
      inc %3
      echo == 3 ==
    }
    echo == 4 ==
  }
}



You get
== 1 ==
CONT
== 1 ==
== 2 ==
== 3 ==
== 3 ==
== 3 ==
== 3 ==
== 3 ==
== 4 ==
== 1 ==
CONT
== 4 ==
== 1 ==
== 2 ==
== 3 ==
== 3 ==
== 3 ==
== 3 ==
== 3 ==
== 4 ==
== 1 ==
CONT
== 4 ==
== 1 ==
== 2 ==
== 3 ==
== 3 ==
== 3 ==
== 3 ==
== 3 ==
== 4 ==
== 1 ==
CONT
== 4 ==
....

(Bug submitted on my scripting website by McFly which isn't good in english, so I posted it for him so Khaled may see it)

Joined: Dec 2002
Posts: 230
G
Fjord artisan
Offline
Fjord artisan
G
Joined: Dec 2002
Posts: 230
This has already been reported numerous times... please use the search feature blush

Joined: Jan 2003
Posts: 247
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Jan 2003
Posts: 247
I searched already

while continue with search for all the past posts and saw nothing

and redoing it again only brings up my post

Last edited by ClickHeRe; 23/06/04 04:30 PM.
Joined: Dec 2002
Posts: 3,015
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,015
I get results, perhaps you forgot to change the Search Options box to "and"? Search results


Link Copied to Clipboard