Starting the Format Editor from the Microsoft Visual Development Environment

The Format Editor presents the format code and a sample of the resulting data layout in a window that works like a dialog box. You can edit either the source code or the data layout, and the Format Editor changes the other to match.

To open the Format Editor:

  1. Load a Fortran source file that contains a FORMAT statement or an I/O edit descriptor.
  2. Place the cursor on the first line of the FORMAT statement or on the line containing the edit descriptor.
  3. From the Edit menu, choose Format Editor. The Format Editor dialog box opens.

The Format Editor dialog box consists of the following text boxes and buttons:

When you open the Format editor in a line with an edit descriptor, the editor attempts to parse the first opening quote that precedes the cursor position. When you open the editor in a line containing a FORMAT statement, the editor attempts to parse the edit descriptors in the statement. If the editor is successful, it displays the edit descriptors in the upper-left box and a sample data display in the lower text box. If the editor cannot parse the descriptor string or FORMAT statement, you will get a parse error message.

To insert new I/O edit descriptors into existing formatted I/O statements or FORMAT statements in Microsoft visual development environment:

  1. Place the cursor in the existing descriptor or FORMAT statement.
  2. From the Edit menu, choose Format Editor.
  3. Choose New Field from the Format Editor dialog box.
  4. Choose the descriptor type (Character, Integer, and so on) and choose whether to insert the descriptor before or after the current descriptor.
  5. A default value is used for the descriptor you choose (for example, I5). To change the descriptor value, select the value and type in the new value. (For example, select 5 from I5 and type 8 to get an I8 format.)

To insert a new format statement:

  1. Place the cursor on a blank line.
  2. From the Edit menu, choose Format Editor.

The Format Editor inserts the words label FORMAT into the file at the cursor. You can define the new edit descriptor with the Format Editor.

For a discussion of the features of the Format Editor in Microsoft visual development environment, choose Format Editor from the Edit menu, and click on Help in the Format Editor dialog box.