Editing Format Descriptors with the Format Editor

The Format Editor is an application for Windows® that shows you what data formatted to match your edit descriptors will look like, and lets you edit either the descriptor list or the data. You can interactively create and edit Fortran 90 FORMAT statements and embedded formatting directives.

You can run the Format Editor either from the Edit menu in the visual development environment or from the command line. The Format Editor program is located in the ...\Common\MSDev98\Bin directory, and is called FRMTEDIT.EXE. To use it from the command line, you specify the source code file name, line number and column position in the argument list, and the Format Editor operates on the formatting at the indicated location. For example:

  FRMTEDIT test.f90 5 18

If the line specified by the second parameter is empty, a new format statement is created with the words label FORMAT.

To use the Format Editor on a multi-line format statement, the argument list must specify the first line of the format statement. In-line comments in a multi-line Format statement are lost when the Format Editor writes the updated format statement and generates new continuation marks. Similarly, the part of a formatted I/O statement that follows the formatting directives is lost when the Format Editor writes the updated directive string back to the file.

When you are finished editing the format statement, the Format Editor rewrites the source file with code for the format you have developed. If the file has the extension .F90, the revised code is written with Fortran 90 free-form syntax rules; otherwise, it is written with Fortran 90 fixed-form syntax rules.

The Format Editor is installed on the Edit menu during Visual Fortran installation. If you have removed it for any reason, and need to reinstall it, you can do so by choosing Customize from the Tools menu. The argument list, which passes the current file name, line number and column position to the Format Editor, is $File $Line $Column. For more information about adding programs to the Tools menu, select the Help button in the Customize dialog.