FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference Manual Home |


CHANGE COMMENT DELIMITER

Syntax:

CHANGE COMMENT DELIMITER TO <string>

COMMENT DELIMITERS AS WRITTEN

Function:

Fortran 77 line comments may begin with the characters C, c, * and ! in column one. The command COMMENT DELIMITERS AS WRITTEN instructs FPT to transcribe line comments with the original delimiter character. The command CHANGE COMMENT DELIMITER TO <string> instructs FPT to change the line comment delimiter systematically to the specified character, written as a quoted string.

The line comment delimiters * and ! are not accepted by all Fortran compilers. In particular, the Salford FTN77 compiler does not accept the character ! in column one (though it does allow trailing comments delimited by ! characters). By default, FPT inserts header comments and diagnostic comments into the code which begin with ! characters. The command CHANGE COMMENT DELIMITER TO "C" (or to "*") should always be used when preparing programs for the Salford compiler.

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

Yes


Default:

COMMENT DELIMITERS AS WRITTEN

(Note that defaults may be changed in the configuration file).

Examples:

The original code:

* Rotate to new coordinates CALL COORD3(C(1),C(2),C(3),DX,DY,DZ,THETA,PHI,0)

In which FPT is to report a diagnostic, is re-written, with the command CHANGE COMMENT DELIMITER TO "C"

C Rotate to new coordinates CALL COORD3(C(1),C(2),C(3),DX,DY,DZ,THETA,PHI,0.0D0) C-------------------------------------------------------^------- C!! FPT - 1873 Actual argument changed to match formal argument C---------------------------------------------------------------

Note that the leading exclamation marks in the diagnostic message have been changed to C comment delimiters.


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