FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference Manual Home |


DEFINE

Syntax:

% DEFINE [:] <logical_name> <file>

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 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/fpt33 for version 3.3 of 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

Yes


Default:

FPTMAIN: is defined as the main FPT installation directory.

Examples:

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:

ASSIGN

EDIT INPUT FILE NAMES


Copyright ©1995 to 2014 Software Validation Ltd. All rights reserved.