Doing a bubble sort in Crystal 10 the message appears
"A loop was evaluated more than the maximum number of times allowed"
Here is the code for the bubble sort
whileprintingrecords ;
shared numbervar array URLnum;
numbervar loop1; numbervar loop2;
numbervar temp; numbervar loop0 ;
loop0 := ubound(URLnum);
if loop0 > 1 then
(
for loop2 := 1 to ubound(URLnum)-1 do (
for loop1 := 1 to ubound (URLnum)-1 do (
if URLnum[loop1] < URLnum[loop1+1] then
(temp := URLnum[loop1] ;
URLnum[loop1] := URLnum [loop1+1] ;
URLnum [loop1+1] := temp
))
The values in the error message segment (nice in Crystal 10) are
loop1 = 96, loop2 = 225, loop0 = 445
ubound(URLnum) = 444
How do I get around it and what is the limit anyway?
I did a search on the Knowledge data base at Crystal, but to no avail
"A loop was evaluated more than the maximum number of times allowed"
Here is the code for the bubble sort
whileprintingrecords ;
shared numbervar array URLnum;
numbervar loop1; numbervar loop2;
numbervar temp; numbervar loop0 ;
loop0 := ubound(URLnum);
if loop0 > 1 then
(
for loop2 := 1 to ubound(URLnum)-1 do (
for loop1 := 1 to ubound (URLnum)-1 do (
if URLnum[loop1] < URLnum[loop1+1] then
(temp := URLnum[loop1] ;
URLnum[loop1] := URLnum [loop1+1] ;
URLnum [loop1+1] := temp
))
The values in the error message segment (nice in Crystal 10) are
loop1 = 96, loop2 = 225, loop0 = 445
ubound(URLnum) = 444
How do I get around it and what is the limit anyway?
I did a search on the Knowledge data base at Crystal, but to no avail