FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference Manual Home |


SAVE FORMAT

Syntax:

SAVE FORMAT <file>

Function:

The SAVE FORMAT command writes the current code format settings to the named file as a table of FPT commands. The file may by invoked as an interactive command file or as a FSP file. The default file name extension is .fsp.

The current format settings may be displayed interactively by the command SHOW FORMAT.

Where to use this command:

Operating system command line

No


Configuration file, config.fsp

No


Specification (FSP) files, *.fsp

No


Interactively, to FPT> prompt:

Yes


Interactive command files

No


Embedded in the Fortran code

No


Example:

The SAVE FORMAT command is useful in setting up a standard code format for a project. For example:

FPT> t 1:5
   1         SUBROUTINE LABVAL(LAB,VAL)
   2         DOUBLE PRECISION LAB,VAL
   3         WRITE(6,900)LAB,VAL
   4   900   FORMAT(1X,A8,2X,E12.2)
   5 >>      END
 
FPT> column format declarations
FPT> lower case symbols
FPT> tab
FPT> t 1:5
   1            SUBROUTINE labval(lab,val)
   2            DOUBLE PRECISION
   2            1 , lab
   2            1 , val
   3            WRITE (6,900)lab,val
   4    900     FORMAT (1X,A8,2X,E12.2)
   5 >>         END
 
FPT> save form peter_format.fsp
FPT>

See also:

SHOW FORMAT


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