FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference Manual Home |


NO SPACES

Syntax:

NO SPACES

[NO] SPACE BEFORE ...

[NO] SPACE AFTER ...

Function:

The SPACE BEFORE, SPACE AFTER and NO SPACES commands control the spacing of the Fortran code written by FPT.

FPT writes one space character between two consecutive tokens on the same line according to the following rules:

  1. A space is always written between two tokens if the first ends with a number or letter and the second begins with a number or letter.
  2. A space is written after a token if SPACE AFTER has been specified for that token.
  3. A space is written before a token if SPACE BEFORE has been specified for that token, unless the previous character is already a space or tab.
  4. FPT does not insert two spaces if a space is required after the first token and before the second.
  5. FPT does not write a space after the last token on a line.
  6. A continuation line is generated automatically if the code extends past printer column 72 in fixed format code. The printer column is computed with the assumption that tabs transfer printing to the next tab stop, at 8 character intervals.
  7. If a line is occupied by a single very long token, such as a character string or Hollerith constant, a space is not inserted between a fixed format continuation character and that token if this would push the end of the token into the Fortran comment field beyond column 72.

The spacing is specified by the commands:

SPACE BEFORE token

NO SPACE BEFORE token

SPACE AFTER token

NO SPACE AFTER token

NO SPACES

The token may be:

Note that the NO SPACE BEFORE and NO SPACE AFTER commands do not remove spaces if these are required after the preceding token or before the next one.

The NO SPACES command removes all unnecessary spaces. It is equivalent to NO SPACE BEFORE all tokens and NO SPACE AFTER all tokens. Note that it does not result in the removal of all space characters because a space is still inserted between consecutive alphanumeric strings, as in for example, INTEGER I.

When a format is set up, it is often convenient to begin with a NO SPACES command and then to add spaces as appropriate.

The SHOW FORMAT command is used interactively to display the current format settings. They are saved to an FSP file by the SAVE FORMAT command.

Example formats are distributed in the files spaced.fsp and compact.fsp in the main FPT directory.

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

No


Default:

NO SPACES

(Note that defaults for format are usually redefined in the configuration file)

Examples:

FPT> NO SPACES

FPT> SPACE BEFORE SYMBOLS

FPT> SPACE BEFORE OPERATORS

FPT> SPACE BEFORE KEYWORDS

FPT> NO SPACE BEF ','

See also:

SHOW FORMAT

SAVE FORMAT


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