Seems like the outer iteration variable is reset in the inner loop.
Example below.
class Bug {
static func printCoeff(int K,int M)
$define DEBUG
int i=0
int j=0
while(i<=K)
;print("i1=",i)
while(j<=M)
if i>0
; never get here, i is reset to 0?
print(i, " ", j)
endif
;print("i2=",i)
j = j+1
endwhile
i = i+1;
endwhile
endfunc
}
Bugbrot {
global:
int K = 2
int M = 2
Bug.printCoeff(K,M)
default:
title = "Bug"
}
Seems like the outer iteration variable is reset in the inner loop.
Example below.
````
class Bug {
static func printCoeff(int K,int M)
$define DEBUG
int i=0
int j=0
while(i<=K)
;print("i1=",i)
while(j<=M)
if i>0
; never get here, i is reset to 0?
print(i, " ", j)
endif
;print("i2=",i)
j = j+1
endwhile
i = i+1;
endwhile
endfunc
}
Bugbrot {
global:
int K = 2
int M = 2
Bug.printCoeff(K,M)
default:
title = "Bug"
}
````