fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |



%DEFINE [:] <logical_name> <file>


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 or output from fpt. The command is similar to the VMS DEFINE command, but the logical name remains local to fpt, and under VMS, it does not become defined in the user's process. It is supported in fpt under all operating systems.

Logical names are usually terminated by the ':' character. If this is intended, the ':' must be written in the DEFINE 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, either by the ASSIGN or the DEFINE commands.

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 Unix, .../fpt/.

The command ASSIGN <file> <logical_name> is equivalent to the command DEFINE <logical_name> <file>.

Please note that the logical names created by the DEFINE and ASSIGN commands are unreleated to the CPP macro names created by the #define command. The logical names are used in file handling by fpt. The CPP macros are used to modify the Fortran code as it is interpreted by fpt.

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


FPTMAIN: is defined as the main fpt installation directory.


The command:

$ fpt mammoth.fsp fptmain:adbserve.fsp

processes the FSP file mammoth.fsp with the commands and files specified in the system FSP file adbserve.fsp.

The fsp file for a program contains the logical name definition:

% define helilib: d:\libs\heli

The file specified in the INCLUDE statement:

INCLUDE 'HELILIB:trot_normal_force.dat'

is read as 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.