FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference 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 Unix, .../fpt/fpt37 for version 3.7 of 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

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:

% assign d:\libs\heli helilib:

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:

DEFINE

EDIT INPUT FILE NAMES


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