fpt and WinFPT Reference Manual - Command-line Commands
| SimCon Home | Ref Manual Home |
MAXIMUM BASE FILE NAME LENGTH
MAXIMUM BASE FILE [NAME] LENGTH [:] <integer> MAXIMUM BASE FILENAME LENGTH [:] <integer>
The base file name is that part of the file name between the directory specification and the last . (period) character which is considered to delimit the file name extension.
The command MAXIMUM BASE FILE NAME LENGTH specifies the maximum number of characters in the base file names of the output files written by fpt. By default, fpt constructs output file names with the same base file names as the corresponding input files. New files are written in response to several fpt commands. The base file names of these files are usually constructed from the base filename of the first Fortran or specification (fsp) file referenced on the command line with suffices, for example:
_par PARAMETER and STRUCTURE include files
_cmn COMMON block include files
_stf Statement function include files
_bda BLOCK DATA sub-program files
The base filenames of these files are therefore four characters longer than the original base file name lengths and could exceed operating system limits. If an input file is read which has a file name extension which differs from the current default, the extension is also appended to the base file name with a separating underscore character. For example, if the current default primary input file name extension is .for and fpt reads the primary file pumps.bda, the corresponding output file will be named pumps_bda.fpt.
If a base file name would otherwise exceed the specified length, fpt truncates it. If a suffix is to be added, fpt truncates that part of the base file name which precedes the suffix. fpt then tests that the output file names are all unique. It may also test that the output files will not overwrite or supersede existing files with the same names in the output directories. This feature is controlled by the command [DO NOT] OVERWRITE EXISTING FILES.
If a truncated file name is not unique, fpt replaces the last one, two or three characters of the base filename (before the suffix if any is present) by the digits 0 to 9 until a unique name is generated.
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|
The base file name length is not limited by default (Note that defaults may be changed in the configuration file).
The file rotor.for is processed on a Windows system with the command:
C:\TEST> fpt rotor.for /maximum_base_file_name_length=8
The output files may include:
C:\test\rotor.fpt C:\test\roto_bda.fpt C:\test\roto_cmn.fpi C:\test\roto_par.fpi
OVERWRITE EXISTING FILES
Copyright ©1995 to 2022 Software Validation Ltd. All rights reserved.