Elsevier Science Home
Computer Physics Communications Program Library
Full text online from Science Direct
Programs in Physics & Physical Chemistry
CPC Home

[Licence| Download | New Version Template] aafm_v1_0.gz(28 Kbytes)
Manuscript Title: FTIDY: a utility program for Fortran 77 programs.
Authors: K.M.H. Boyd, N.S. Scott
Program title: FTIDY
Catalogue identifier: AAFM_v1_0
Distribution format: gz
Journal reference: Comput. Phys. Commun. 39(1986)421
Programming language: Pascal.
Computer: VAX 11/780.
Operating system: VMS.
Word size: 32
Peripherals: disc.
Keywords: Fortran documentation, Utility, General purpose, Fortran 77, Keyword recognition, Indenting.
Classification: 4.14.

Nature of problem:
To regenerate existing standard Fortran 77 software in order to improve the layout. This is achieved by indenting control structures, relabelling statement labels and restructuring common blocks.

Solution method:
A statement at a time is analysed to ascertain its effect on the program layout. Statements which effect the layout are modified prior to printing. Several passes are made on the input text,
Pass 1 relabels labels in columns 1-5
Pass 2 relabels referencing labels
Pass 3 reorganises common blocks and indents control statements.

The utility is only capable of formatting syntactically correct standard FORTRAN 77 programs. Comments are not indented and at times the order of these may be slightly modified. The relabelling function could cause a statement to exceed the maximum permissable line length of 20 lines, if this occurs the user will be notified. The utility is is written in PASCAL and designed to be run on VAX systems. It can however be run on non-VAX systems by replacing the DCL program FTIDY.COM by an equivalent one on the host machine. Users are warned that the use of the TAB key in their FORTRAN source will give unexpected results.