fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref 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. The character is written as a quoted string in the fpt command.

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 FTN77 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 No

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 2018 Software Validation Ltd. All rights reserved.