fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

TAB FORMAT OUTPUT

Syntax:

TAB [[FORMAT] [OUTPUT]]

Function:

Tab format is a legaacy and 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 Code

! Printer column: !23456789 DO 100 K=1,3 WRITE(ILUN,1200) 1 K, ARR(K) 1200 FORMAT('Element:',I2,F12.3) 100 CONTINUE

Tab Format Code

! Printer column: !23456789 |-> DO 100 K=1,3 |-> WRITE(ILUN,1200) |-> 1 K, ARR(K) 1200|-> FORMAT('Element:',I2,F12.3) 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.

Please Note

The facility to write code in tab format is retained in fpt for compatibility with earlier versions (fpt was first released in 1989). The authors advise against using this format.

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

FREE FORMAT OUTPUT

Note that the output code format is usually specified in a format file referenced from the configuration file. Free format output is recommended.

See Also

FIXED FORMAT OUTPUT

FREE FORMAT OUTPUT

OUTPUT CODE LINE LENGTH

SAVE FORMAT

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