fpt and WinFPT Reference Manual - Command-line Commands
| SimCon Home | Ref Manual Home |
DECLARE PARAMETERS IN SINGLE STATEMENTS
Syntax:
[DO NOT] DECLARE PARAMETERS IN SINGLE STATEMENTS [DO NOT] CHANGE PARAMETER DECLARATIONS TO SINGLE STATEMENTS
Function:
Parameter statements are re-written so that every parameter is declared in a single statement, specifying all of its attributes (Data type, kind, value, public/private status etc.). The new declarations are written in the position of the value declaration of the original PARAMETER statement, preserving the order of declaration where multiple parameters were declared in one statement. The original declaration statements are removed.
If a trailing comment follows an original declaration it is preserved in the new declaration.
Where to use these commands:
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
No change is made by default
Diagnostic marker
The changes are marked by the diagnostic:
!--------------------------------------^--------------------------------------- !!! FPT - 4405 Full declaration inserted by fpt !------------------------------------------------------------------------------
This diagnostic may be suppressed by the command "% suppress diagnostic 4405"
Example
The parameter declarations:
CHARACTER*1 cr,lf,tab,pbslac PARAMETER (cr=CHAR(13),lf=CHAR(10),tab=CHAR(9)) PARAMETER (pbslac=CHAR(92)) ! To avoid writing \ in the code
are changed to:
CHARACTER(LEN=1),PARAMETER :: cr=CHAR(13) CHARACTER(LEN=1),PARAMETER :: lf=CHAR(10) CHARACTER(LEN=1),PARAMETER :: tab=CHAR(9) CHARACTER(LEN=1),PARAMETER :: pbslac=CHAR(92) ! To avoid writing \ in the code
fpt version
This command is implemented in fpt versions 4.310 and later.
Copyright ©1995 to 2025 Software Validation Ltd. All rights reserved.