Information générale
Catégorie:
Codage, syntaxe et commandes
>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?)
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement