Code formatter for FORTRAN 
Author Message
 Code formatter for FORTRAN

Does anyone know if there exists a (commercial or freeware) fortran
code indenter/formatter? A friend is faced with revamping a largely
unreadable old code and could use any available tools to render it more
legible.

Thanks in advance.      




Sun, 01 Dec 1996 21:57:03 GMT  
 Code formatter for FORTRAN


Quote:
(Jan Gatowski EN/16) writes:

|>Does anyone know if there exists a (commercial or freeware) FORTRAN
|>code indenter/formatter? A friend is faced with revamping a largely
|>unreadable old code and could use any available tools to render it more
|>legible.

While I was at UK DECUS I attended a talk which described a product called
The FORTRAN Partner which has as its capabilities (according to the
documemtation I have):

        Screening: automatically checking whole FORTRAN programs for
        classes of error not detected by compiler

        Troubleshooting: analysing programmes interactively to expose
        problems or inconsistencies

        Porting: moving code to different FORTRAN environments

        Standardising: converting code to a consistent style and
        creating a framework for documentation

        Optimising: optimising code for speed of execution

The product is available on the following platforms:

        Alliant FX80
        Avalon Vaccelerator AP/30
        Digital VAX (OpenVMS)
        Digital Alpha AXP (OpenVMS)
        HP Risc Processors under Unix
        IBM PC and compatible systems with minimum 80386 processor
          and Maths Coprocessor
        IBM Risc System 6000 under AIX
        Parsys Supernode under Idris
        Silicon Graphics MIPS processors under IRIS
        Sun SPARC and compatible under Solaris and SunOS

The vendor is:

        Software Validation Limited
        PO Box 270
        Swindon SN4 0TQ
        England
        Tel: +44 (0) 793 740002
        Fax: +44 (0) 793 740974

A single workstation/PC price is given as 945 Pounds.  I don't know what
a US price would be.

One of the claims which impressed me was the ability to understand many
different syntax variants and convert them to a more standard form.  The
formatting rules are customizable.  (The optimizations consist of
inline expansion and loop unrolling.)

I have not actually tried this product (I just got a demo disc today) and
this should in no way be considered an endor{*filter*}t of the product by
either myself or Digital Equipment Corporation.  However, it looks like
it would be worth considering for some applications.
--


SDT Languages Group               WWW:   http://www.*-*-*.com/
Digital Equipment Corporation    
110 Spit Brook Road, ZKO2-3/N30
Nashua, NH 03062-2698             "Free advice is worth every cent"




Sun, 01 Dec 1996 23:02:38 GMT  
 Code formatter for FORTRAN

Quote:
>Does anyone know if there exists a (commercial or freeware) FORTRAN
>code indenter/formatter? A friend is faced with revamping a largely
>unreadable old code and could use any available tools to render it more
>legible.

>Thanks in advance.  



I will send you a program that indents the code and puts blanks
in sensible places (and removes them where they're not sensible).

                                                  Mike Metcalf



Sun, 01 Dec 1996 23:31:05 GMT  
 Code formatter for FORTRAN


Quote:
>Does anyone know if there exists a (commercial or freeware) FORTRAN
>code indenter/formatter? A friend is faced with revamping a largely
>unreadable old code and could use any available tools to render it more
>legible.

Toolpack.  It's free and can also restructure your code to make it
really legible.  The first thing I do to old code.

Michael
--
Michael Lemke
Institute of Astronomy, Cambridge UK



Mon, 02 Dec 1996 19:02:07 GMT  
 Code formatter for FORTRAN


   > >
   > >Does anyone know if there exists a (commercial or freeware) FORTRAN
   > >code indenter/formatter? A friend is faced with revamping a largely
   > >unreadable old code and could use any available tools to render it more
   > >legible.
   > >
   [...]

   > I will send you a program that indents the code and puts blanks
   > in sensible places (and removes them where they're not sensible).

   >                                                   Mike Metcalf

If you (or your friend, or whatever) also know a bit of TeX you might
want to consider looking into FWEB (ftp.ppl.gov /pub/fweb). Mind you, this
not an automatic-source-parser/formater sort of thing. It is "Literate
Programming" and requires some effort on your part. In the other hand I find
that it is very handy when it comes to analyze some major piece of code.

Apart from the nicely typeset print out and the very useful cross
referencing index, the good thing about it is that you can look at a small
s{*filter*}of code until you understand it, give it a "symbolic" name (and
possibly add extensive comments), place a "marker" in the place where this
s{*filter*}is intended to go, and move the actual code to another part of the
file where it doesn't bother you.

By the time you are finished you have a top-down, pseudocode, outline-like,
description of the program. Something that might look like this:

        PROGRAM Ofuscated
           <Declare variables>
           <Read data>
           <Do something>
           ...
        END

        <Declare variables>=
        INTEGER I
        REAL    Foo
        ....

and so on. Give it a try.

------------------------------------------------------------------------------

  Institute of Astronomy  |
   Cambridge University   |       "You might very well think so, but I could
      United Kingdom      |   not possibly comment"  --  Francis Urqhart, PM
------------------------------------------------------------------------------



Tue, 03 Dec 1996 05:31:27 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Clarion code formatter

2. Clarion source code formatter

3. Source Code Formatter for PL/I

4. Code Formatter

5. Rexx Code Formatter/2 Availability

6. S: REXX Code Formatter

7. Rexx Code Formatter/2

8. Code formatter

9. RCF/2 Rexx Code Formatter

10. Rexx Code Formatter-Tab Characters?

11. New REXX Code Formatter/2 release

12. I need a code beautifier or formatter

 

 
Powered by phpBB® Forum Software