Free source code diagramming programs

A

Al Balmer

You win. My keyboard made minor errors.
Darn cheap Chinese keyboards!
The idea is still the same.

But remains to be demonstrated. In the example given, I could have
corrected the code sufficiently that reformatting was possible (the
unbalanced braces and parens) but you could legitimately claim that
the result wasn't what you intended.

I did, in fact, balance the code and run the beautifier. It left the
comments (which you seemed to be concerned about) in the same relative
position, but the formatting of the last line depended on where I put
the balancing parens.
When a programmer formats his/her code
and/or comments carefully, pretty printers destroy it. Here is another
example, FORTRAN only, in which you have a useful comment table that
explains things (again, you need a fixed width font).

c variable Initial Value Meaning Permanence
c --------- ------------- ------------------ ----------
a = 5 ! Happiness quotient Transitory
b = 17 ! Unhappiness factor Changeable
garbage = 3 ! Time differential Irrelevant
silly = 5.23 ! Semantics Who cares?
example = 18 ! Meaningfulness A lifetime
ohmy = 999 ! Wizard of Oz Forever
Unfortunately, I don't have a pretty-printer for FORTRAN, but I
believe that indent would process this without destroying the layout.
Perhaps someone else could try it.
Again, a pretty printer will kill all this extremely useful
information. If you casually apply a pretty printer to tens of
thousands of lines of code, and that gets passed on to the next
benighted programmer, you will lose something he/she will need to
understand.
No, what will happen, in the usual case, is that the program will
become much easier to read, and the maintenance programmer will take
less time and make fewer mistakes.

Been there, done that. For over 30 years.

If you say so.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top