Question: Unterminated loop in procedure

Dear all,


I'm having trouble defining a Maple procedure containing for loops. I have one outer for loop which I terminate at the end and two separate for loops of which the first one get's terminated before the second one starts. Nethertheless Maple complains, that my outer loop doesn't get terminated and points to to a point before the second inner for loop starts. I based this procedure on a procedure I defined in another worksheet and the latter one is working just fine, although the structure ist the same in both procedures. As far as I can see, the structure is

for n from 0 to T do
for i from 1 to J do
....
end do;
for i from J-2 to 1 by -1 do
end do;

end do;

I have several if statements in the procedure, too, but as far as I can see, everything is terminated fine. Perhaps there is something else wrong with my procedure and I'm just getting a strange error? I would really appreciateit, if somebody could take a short look at the problem. Since the procedure takes up several pages I'm uploading my Maple work sheet. The relevant procedure is the one defined just after the red comment "#  actual code" which is about 60% through the work sheet.

Thank you all.

BD_collapse_2.mw.

 

Please Wait...