Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
To iif or not to iif = .t.
Message
From
31/05/2001 16:09:51
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00513276
Message ID:
00513393
Views:
16
Nadya --

I find myself programming in the spirit of this discussion.

In that scenario you describe I use DO WHILE rather than FOR..NEXT for all of the loops. I recently coded a list box that displays a Chart of Accounts. It draws on 2 tables -- 1 of major and minor ranges and the other of individual accounts. I used logic similar to what you have -- 3 nested loops -- that to position each range or account properly in the array.

The general guideline I use is this:

1. If the loop is based on a specific number of operations, I use FOR..NEXT.

2. If the loop is based on a specific condition, I use DO..WHILE.

Often, in a nested situation, if one loop requires a condition, they all will.


Enjoy!

Jay
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform