fpt and WinFPT Reference Manual - Command-line Commands
| SimCon Home | Ref Manual Home |
EDIT INPUT FILE NAMES
EDIT [INPUT] FILE NAMES: REPLACE <string> BY <string> EDIT [INPUT] FILE NAMES: LOWER CASE EDIT [INPUT] FILE NAMES: UPPER CASE EDIT [INPUT] FILE NAMES: REMOVE WHITE SPACE EDIT [INPUT] FILE NAMES [:] [DO NOT] REMOVE TEXT LIBRARY REFERENCES
This command is used to change the spelling and syntax of file names, in particular, of the file names written in INCLUDE statements, when code is migrated between operating systems. For example, under VMS, Win32 and DOS file names may be spelled inconsistently in upper and lower case. Under Linux and OSX they must be spelled consistently, usually in lower case, and under MPX they must be written in upper case.
The specified changes are made to all file names:
The changes are made before interpretation of logical names, set up by the ASSIGN and DEFINE commands, and before the files are opened.
When one string is replaced by another, the string to be replaced is not case sensitive and the replacement string is case sensitive.
The REMOVE WHITE SPACE command deletes all white space characters. It does not convert them to underscores. This may be achieved (for spaces) by specifying EDIT INPUT FILE NAMES: REPLACE ' ' BY '_'.
Where to Use this Command
|Operating system command line||Yes|
|Configuration file, config.fsp||Yes|
|Specification (fsp) files, *.fsp||Yes|
|Interactively, to FPT> prompt||No|
|Interactive command files||No|
|Embedded in the Fortran code||No|
No change is made by default (Note that defaults may be changed in the configuration file).
The file $STRUCTS.INC is transferred from Win32 to Unix. Unix file names which begin with the $ character are difficult to handle because the names are interpreted as symbols by the operating system. $STRUCTS.INC is therefore renamed dollar_structs.inc. Other names beginning with dollars are also changed.
The file specifications in INCLUDE statements for $STRUCTS.INC are written inconsistently in upper and lower case and begin with the $ character. The commands:
%edit file names: lower case %edit file names: replace '$' by 'dollar_'
convert the file names in both of these INCLUDE statements:
INCLUDE '$structs.inc' : : INCLUDE '$STRUCTS.inc'
to 'dollar_structs.inc' on-the-fly, before the file is opened.
Copyright ©1995 to 2022 Software Validation Ltd. All rights reserved.