Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FOR NEXT does not loop the last occurence
Message
From
02/10/1997 19:29:33
 
 
To
02/10/1997 19:27:21
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00052963
Message ID:
00052964
Views:
34
>In the Init() of my grid class, I discovered a situation new tonight. When I saw that, I restarted Visual FoxPro but it didn't change anything.
>
>It goes like this:
>
>FOR lnCompteur=1 TO This.ColumnCount
>   MESSAGEBOX(STR(lnCompteur)+' '+STR(This.ColumnCount))
>   ...
>   MESSAGEBOX(STR(lnCompteur)+' '+STR(This.ColumnCount))
>NEXT
>
>I put a messagebox to show the FOR NEXT value and the number of maximum occurence. It goes like this:
>
>1 7
>2 7
>3 7
>4 7
>5 7
>6 7
>
>The 7th occurence is never looped. Isn't this weird?

Please, ignore this message. A RETURN was added instead of LOOP in a specific condition which was causing the loop to be skipped.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform