FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference Manual Home |


ADD TO INPUT SEARCH PATH

Syntax:

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

Function:

The commands INPUT SEARCH PATH, PRIMARY INPUT SEARCH PATH and INCLUDE INPUT SEARCH PATH specify sequences of directories which are to be searched in turn for primary and for INCLUDE input files. The command ADD TO INPUT SEARCH PATH appends additional directories to the current paths for both primary and for INCLUDE files.

The search paths are used:

  1. for all primary files;

  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 may be written as quoted strings, and this is recommended when the names are case sensitive.

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"
%add to input path: "\john\testlib"   -
                    "\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, then in \john\testlib, 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 commands ADD TO PRIMARY INPUT SEARCH PATH and ADD TO INCLUDE INPUT SEARCH PATH append directories separately to the 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

Yes


Default:

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

Example:

! chequers.fsp
%input search path: "/usr/people/john/work"
% add to input search path: -
  "/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:

ADD TO INCLUDE SEARCH PATH

ADD TO PRIMARY SEARCH PATH

IGNORE DIRECTORIES IN INCLUDE STATEMENTS


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