FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference Manual Home |


INPUT SEARCH PATH

Syntax:

[ADD TO] INPUT [SEARCH] PATH [:] <string> [<string>...]

Function:

Specifies a sequence of directories which are to be searched in turn for input files. The search path is used:

  1. for all primary files where the file name does not include a directory specification;

  2. for INCLUDE files when the INCLUDE statement does not contain a directory specification;

  3. for INCLUDE files when the command IGNORE DIRECTORIES IN INCLUDE STATEMENTS has been made.

The directory specifications are written as quoted strings.

If ADD TO INPUT SEARCH PATH is specified, the argument is added to the existing path (if any). Otherwise the new path replaces the old path.

This command is position sensitive in the command line or specification file in which it is written. It applies to the files which follow it, and a list of Fortran files may contain several different search path specifications.

The search path is inherited by nested INCLUDE files. Thus, for example, in the specification (written in an FSP file):

%input path: "\john\aerosim\include" -
             "\john\ilib"
aero
gusts

if aero.for contains the INCLUDE statement:

INCLUDE 'AEROTAB.INC'

and AEROTAB.INC in turn contains the statement:

INCLUDE 'WIND.INC'

then WIND.INC and AEROTAB.INC will both be sought first in \john\aerosim\include and then, if no matching file is found, in \john\ilib.

Note, in the example above, that the list of directories may extend over two or more lines. The command continuation character must be used when this occurs.

The command ADD TO SEARCH PATH appends additional directories to the current search path. The command INPUT DIRECTORY specifies a single input directory. The commands PRIMARY INPUT SEARCH PATH and INCLUDE INPUT SEARCH PATH specify separate search paths for primary and for INCLUDE files.

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:

The current directory (Note that defaults may be changed in the configuration file).

Example:

! chequers.f
%input search path: "/usr/people/john/work"  >
                    "/usr/people/geoff/cheq" >
                    "/usr/bin/graphlib/source"
move.f
crown.f
timecount.f
eval.f
refute.f
games.bda
! end chequers.fsp

Note that in this example the command continuation character has been changed to ">".

See also:

IGNORE DIRECTORIES IN INCLUDE STATEMENTS

INCLUDE INPUT SEARCH PATH

PRIMARY INPUT SEARCH PATH


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