fpt and WinFPT Reference Manual - Command-line Commands
| SimCon Home | Ref Manual Home |
CHANGE PERCENT and CHANGE DOT
Syntax:
[ DO NOT ] CHANGE % TO . [ DO NOT ] CHANGE . TO % [ DO NOT ] CHANGE PERCENT TO DOT [ DO NOT ] CHANGE DOT TO PERCENT
fpt Version
This command is implemented in fpt versions 4.312 and later.
Function:
Systematically changes all derived type component and record field delimiters to "%" or to ",". The "," delimters of .TRUE. and .FALSE. and of intrinsic and user-defined operators are not affected. Nor are the "%" characters in the argument protocol specifiers "%VAL", "%REF", "%LOC" and "%DESCR".
Implications
The "%" component delimiter is standard-conforming. However it is not used as a field or component delimiter in other languages. It is the same size as alphabetic characters and reduces the readability of the code.
The "." component or field delimiter is not standard-conforming. It is the default delimiter for DEC records and fields (which are also not standard conforming but are quite widely used). It conforms to the syntax of other languages, in particular C, and is clearly readable.
Tests have been carried out on large modern Fortran programs, and no cases have been found where converting "%" type component or field delimiters to "." caused any change in behaviour under the ifx and gfortran compilers.
However, the "%" delimiter is also used to delimit the "re" and "im" real and imaginary specifiers from complex variable names. Problems have been found when these delimiters are converted to ".". Please see the test programs in the directory language_tests/re_im/ under the main fpt installation directory. The command CHANGE % TO . changes these delimiters. This will be revised in future releases.
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
No change is made by default.
Copyright ©1995 to 2025 Software Validation Ltd. All rights reserved.