Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!oliveb!pyramid!ctnews!starfish!jerry From: jerry@starfish.Convergent.COM (Gerald Hawkins) Newsgroups: comp.lang.c Subject: C compilers/variables Keywords: variables c language summary Message-ID: <996@starfish.Convergent.COM> Date: 27 Apr 89 18:24:33 GMT Distribution: usa Organization: Convergent Technologies, San Jose, CA Lines: 29 Is anyone aware of a program to analyze a c-program for the variables it uses, producing a table showing the usage? I had a Fortran compiler which did this once, but I've not seen it for c. An example of the output I would want: Variable_Name Used on Line(s) a 37, 43, 53 (main) b 21 (global) 45, 57, 63 (main) 135, 145, 159 (crashsystem) 175, 185, 195 (fixsystem) Function_Name getch() 47, 49, 51 (main) 136, 139, 143 (crashsystem) I think you get the idea. The purpose of this is to help track down variables--especially global ones--which you might overlook while maintaining code. Also when writing code, to help remind one to #include the necessary headers for the functions used. " I don't want to imply I'm underpaid, but ... Last time I took my paycheck to the bank to be cashed, the teller asked me, 'How would you like that, sir, Heads, or Tails?' " Jerry ( jerry@starfish.Convergent.COM ) -----