Unused variables?

Is there a feature or method in Igor that will inform you of unused variables, strings, and other declarations in user functions?
But of course you can highlight them and search the rest of the function for related entries. This at least lets you track down if/how they are called..
Another method is to comment the declaration and look for a compiler error. But this is tedious if you have many items to check.
daggaz wrote:
But of course you can highlight them and search the rest of the function for related entries. This at least lets you track down if/how they are called..


Ah, why didn't I think of that. :D
Dont forget that if your code consists of multiple function files, that you need to ensure IGOR searches all the relevant .ipf's and not just the current file.
daggaz wrote:
Dont forget that if your code consists of multiple function files, that you need to ensure IGOR searches all the relevant .ipf's and not just the current file.


Thanks, yeah I know. I was mainly interested in doing this for a function's local variables as I've got several projects where I'm combining multiple procedure functions from someone else's rather crude coding (they used a lot of randomly placed variable and string declarations in rather lengthy functions). It would have been nice to have something flag all the unused ones automatically; however, I can copy each function to a separate procedure file and then do a search on each variable I find to clean them up. Cumbersome, but doable.