These programs diagram source code in the following languages:
C and C++
FORTRAN
HTML (very incomplete)
IDL, PV-WAVE, GDL and FL
They do things like draw lines showing the start and end of routines and blocks, put * next to jumps, and = next to commented out sections, and can warn you of certain classes of error.
They can help you find problems in your own code, or help you look at other people's long complicated legacy code.
For example:
+---------------- subroutine a(x) | 1 |+--------------- do i=1,5 | 2 ||+---------------- if(i/2*2.eq.i)then | 3 ||| x=x*i | 4 ||+---------------- else | 5 ||| x=x/i | 6 ||+---------------- endif | 7 |+--------------- enddo | 8 +---------------- end | 9
The VAX and MS-DOS procedures have not recently been tested.
If you like or dislike these programs, send e-mail to username grunes at domain yahoo.com.
Bug reports must include sample code on which it failed.
The programs themselves are in FORTRAN. I know that is a problem for users of other programming languages, but FORTRAN is freely available as g77 or g95 under Cygwin (under Windows) or Linux, and is available as f77, f90 or f95 on many other platforms. Compilation is simple, e.g.
g77 diagramf.f -o diagramf