Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

X-Ref of Varibles, Subroutines and functions

Status
Not open for further replies.

kkitt

Programmer
Dec 1, 2002
122
US
Is there a way to create a x-ref that displays where procedures and functions are used along wether or not variables are used. I have rather large application with both code in the forms along with module code.

I am trying to clean it out of all dead code and varibles that are no longer in use to make maintenance easier in the future.



 
Commercial products (e.g. Speed Ferretadvertise this capability, along with additional benefits, such as global replacement.

I am not a current user or owner of this product and am aware that there are others which advertise similar capabilities (including some references posted in these fora). Further, I am not endorsing any specific product in this arena.

You can also 'roll your own'.

In the former case, there are limitations, such as not finding references which are generated in code (via concatenation) and others.

In the latter, the linmitation is on your thgoroughness (predicated on the time, efort, skill and imagination available).

Many years ago, I did write a series of procedures which attempted to gather and organize the information to generate a comprehensive cross reference for a project, and found that, with the notable exception of the code generated references noted above and -foir my purposes MACROS-, the overall task is not difficult but it is somewhat time consumming. The approach is to parse through each of the document types (Tables, Queries. Forms, Reports and Modules), retrieving each reference to external variables. then generate another table (or matrix) listing each external variable along with each possible object including a reference to it.

While the specific process worked well for that project, it falls well short of perfection, so a back-up strategy was to simply re-name the objects which were not externally referenced with some unique prefix and continue testing the app. When something broke, if the offense was tracked to a re-named object, the re-naming was un-done. In more current versions of programming (in general) name tracking would require some additional effort.





MichaelRed
mlred@verizon.net

 
MZtools from will probably do quite a lot of what you want, and quite a lot else. It's also free.

I believe that many other users of this site also use MZ

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top