I don't think anyone can clean up code by looking at an image of it, especially since we don't know what all the subpanels are doing.
It seems the globals are used to communicate with the subpanels. Is this correct?
First you need to answer the most important question: Does the program work correctly? Are there performance issues?
If it works, it is probably not worth throwing more man hours at it unless there is a good reason.
There are plenty of very awkward code constructs. I already mentioned some of them (e.g. the small inner while loops) elsewhere.
Here are some pointers:
Look for duplicate code and consolidate it onto a FOR loop. For example, you need only one "insert VI" and all the trimmings, if you would
just autoindex over an array of filenames. (upper right). Same for reading all the files below it.
Here are some other random obervations, your code is full of similar things:
Setting a boolean array to all false while keeping the size the same can be done in many ways. The lower one is probably more efficient.
Creating an interger array of 0...19999 can be done without a shift register (bottom).
These are really just details. You probably should work on the overall dataflow. The problems are much deeper. 🙂
Message Edited by altenbach on
05-13-2008 04:37 PM