Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting elements in an array
Message
From
10/02/2009 13:03:36
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Selecting elements in an array
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01380602
Message ID:
01380602
Views:
106
Hi All,

I have a one dimensional array of X elements. I want to run a loop an arbitrary number of times Y where Y can be greater than X. In each iteration of the loop I want to select an array element in sequential order. When the loop counter exceeds the number of array elements then I just want to start at element 1 again. What is the formula to calculate the next element number in the current loop? I'm sure its MOD() something or other ...

UPDATE: OK, I got it. Thanks.
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Next
Reply
Map
View

Click here to load this message in the networking platform