FORMAT

Purpose

Specifies a FORTRAN-like format for the input data.

Syntax

FORMAT str | FREE

Arguments and Subcommands

str

A FORTRAN floating point format for reading the input data. If the format contains blanks or tabs, or is entered on more than one line, it must be enclosed in quotation marks. The maximum length of str is 512 characters.

FREE

Indicates that the input data can be read without an explicit format.

Remarks

A file can be read without an explicit format (free-format) if the input file is a text file and if the fields are separated from other fields by spaces, tabs, commas, or new lines. Although a single case may extend over several records (lines) in the input file, it is assumed that each new case begins on a new line.

When data are read, free-format input is assumed unless a format string is given explicitly with this command or implicitly with the USE command. The FORMAT FREE command need only be used if a format was given unnecessarily.

As indicated in the description of the NAMES command, it is possible to use only a subset of the variables on a free-format input file.

If a FORTRAN format is specified, all variables must be read in as floating-point variables. If you use the integer (I) format, an error statement is printed when the data is read.

See Also

USETXT

Examples

a)  A format string with no embedded blanks, tabs or new lines. Quotation marks are not required.

FORMAT (5f2.0,f10.0,t100,f5.0)

b)  A format string entered on two lines. Quotation marks are required.

FORMAT '(5f2.0,f10.0,f6.3,t45,f7.2,
         f10.0,f8.0)'