Subscribe Bookmark RSS Feed

Loop isn't working. Help!

whom

Community Trekker

Joined:

Jun 23, 2011

Ok, I'm stumped and getting a bit annoyed... I have a JMP file (DT2) with 167 records. MaxOrigRows does get set to 167. However, the FOR loop goes into an infinite loop. Inside the loop, the value of MaxOrigRows IS 167, but the variable "i" was going past 60,000 when I was able to finally stop. Can anyone see anything wrong?



MaxOrigRows = NRow(Dt2);
Show (MaxOrigRows);

For (i=1,MaxOrigRows, i++,
Show(i,MaxOrigRows);
);
2 REPLIES
whom

Community Trekker

Joined:

Jun 23, 2011

ah... nevermind.. the limit variable wasn't correct... I was getting mixed up with the FOR loop construct for another language, and omitted the " i <=" part. HA!

For (i=1, i<=MaxOrigRows, i++,
Show(i,MaxOrigRows);
);
whom

Community Trekker

Joined:

Jun 23, 2011

sorry, should have been "i less than or equal to MaxOrigRows"

I think the Less Than Sign messed up the formatting.