FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference Manual Home |


TAB FORMAT OUTPUT

Syntax:

TAB [[FORMAT] [OUTPUT]]

Function:

Tab format is a widely used but non-standard formatting convention for Fortran code. It is supported, for example, under VMS, DEC/Compaq Visual Fortran and HP Fortran.

TAB format is a fixed format convention in which the statement label field is delimited by a tab character. The statement body therefore starts in printer column 9. Continuation characters are also written after a tab character in printer column 9 and must be numeric. The appearance of tab-formatted code is as shown in the example below:

Standard Fixed-format FORTRAN 77

Printer column 123456789
        DO 100 i=1,3
           WRITE(ilun, '(''Element: '',I2,'' = '',F12.6)
       1   i, alpha(i)
  100   CONTINUE

 
Tab-format Fortran

Printer column 123456789
          DO 100 i=1,3
             WRITE(ilun, '(''Element: '',I2,'' = '',F12.6)
          1  i, alpha(i)
  100     CONTINUE

 
Tab-format Fortran Showing the Tab characters

Printer column 123456789
  |------>DO 100 i=1,3
  |------>   WRITE(ilun, '(''Element: '',I2,'' = '',F12.6)
  |------>1  i, alpha(i)
  100|--->CONTINUE

Compilers differ in the interpretation of a tab character when computing the length of a Fortran line. Some, for example VMS, count the tab character as a single column, and 71 characters are therefore available for the statement body. Others count the tab character as equivalent to the number of columns to the next tab stop at 8 column intervals. When FPT writes tab-formatted code the second convention is adopted. The code therefore compiles safely on all systems which support this format.

FPT can read and write code in free format, fixed format, fixed format with long (132 character) lines and tab format. The commands which specify the output format are:

FREE FORMAT OUTPUT

FIXED FORMAT OUTPUT

TAB FORMAT OUTPUT

OUTPUT CODE LINE LENGTH

The output code format is saved by the SAVE FORMAT command.

Where to use this command:

Operating system command line

Yes


Configuration file, config.fsp

Yes


Specification (FSP) files, *.fsp

Yes


Interactively, to FPT> prompt:

Yes


Interactive command files

Yes


Embedded in the Fortran code

Yes


Default:

TAB FORMAT

Note that the output code format is usually specified in a format file referenced from the configuration file. Free format output is recommended, but the defaults have not been changed to retain compatibility with earlier versions of FPT.

See also:

FIXED FORMAT OUTPUT

FREE FORMAT OUTPUT

OUTPUT CODE LINE LENGTH

SAVE FORMAT


Copyright ©1995 to 2014 Software Validation Ltd. All rights reserved.