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:27:21
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
FOR NEXT does not loop the last occurence
Miscellaneous
Thread ID:
00052963
Message ID:
00052963
Views:
82
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?
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
Next
Reply
Map
View

Click here to load this message in the networking platform