Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IF...ENDIF
Message
From
25/02/2000 16:11:14
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvania, United States
 
 
To
25/02/2000 15:32:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00337800
Message ID:
00337830
Views:
12
>I have 758 lines of code to look at with too many IF's. I am having a hard time trying to follow what each IF construct does. I tried beautify but that does not do the job. Is there any way, like an utility or something that would separate each IF construct?

Are they small or large blocks of code? If they're large (2-3 pages) then 758 lines total is probably only a dozen (or so) structures.

Here's a thought, open the PRG with Excel. (remove all column breaks, so each line fits in a single column, general type, etc.) Then use the Data/Group&Outline to group the if..else..endifs into manageable blocks. (select some rows, use DATA/G&O/Group) Once you've done the work (sorry, it IS work) of setting up the excel view of your program, you can expand/collapse the code-blocks as a visual map to see what's going on. (using the top-down approach, you could collapse everything but the outermost structure, then work your way in when you understand each block)

Or maybe a less productive method, but satisfying on other levels, would be to hunt down the maniac who left this mess without any comments! (you have already informed management that once you straighten this out you're taking a vacation day, right?)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform