fpt and WinFPT Reference Manual - Command-line Commands
| SimCon Home | Ref Manual Home |
ASSIGN
Syntax:
% ASSIGN [:] <file> <logical_name>
Function:
This command defines a logical name which may be used as part or all of a file specification for the files and directories input to fpt. The command is similar to the VMS ASSIGN command, but the logical name remains local to fpt, and, when fpt is run under VMS, the name does not become defined in the user's process. It is supported in fpt under all operating systems.
Please note that this command does NOT set up a CPP symbol and that the logical names used in file specifications are independent of the symbols defined by the #define command.
Logical names are usually terminated by the ':' character. If this is intended, the ':' must be written in the ASSIGN command.
Logical names are not case sensitive. The corresponding file or directory specifications may be. If they are, it is recommended that they are enclosed in quotation marks.
fpt replaces all occurrences of all logical names by the corresponding file or directory specifications before opening the input files. Logical names are interpreted in all contexts in which input files are opened, including the file specifications in INCLUDE statements. They may therefore be used to provide logical name support for code which has been migrated from VMS to other environments.
Any number of logical names may be defined. They are interpreted in the order in which they are defined.
Logical names are interpreted after all changes specified by the EDIT INPUT FILE NAMES command have been made.
The logical name FPTMAIN: is always defined, and is the main fpt installation directory, for example under Linux, by default, /usr/lib/fpt/.
The command ASSIGN <file> <logical_name> is equivalent to the command DEFINE <logical_name> <file>.
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 |
Default
FPTMAIN: is defined as the main fpt installation directory.
Examples:
The FSP file for a program contains the logical name definition:
% assign d:\libs\heli helilib:
The file specified in the INCLUDE statement:
INCLUDE 'HELILIB:trot_normal_force.dat'
is then read from d:\libs\heli\trot_normal_force.dat. Note that the logical name is not case sensitive.
See Also:
Copyright ©1995 to 2024 Software Validation Ltd. All rights reserved.