fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

INCLUDE INPUT DIRECTORY

Syntax:

INCLUDE [INPUT] [FILE] DIRECTORY [:] <filename>

Function:

Specifies the default directory from which INCLUDE files are read when the INCLUDE statement does not contain a directory specification, or when IGNORE DIRECTORIES IN INCLUDE STATEMENTS has been specified.

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

The default INCLUDE file directory is inherited by nested INCLUDE files. Thus, for example, when the command is made (to a Linux system):

$ fpt "%include input file directory: ../inc" aero.f90

if aero.f90 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 read from ../inc.

The command INPUT DIRECTORY specifies the default input directory for both primary and INCLUDE files. The command PRIMARY INPUT DIRECTORY specifies the input directory for primary files. The command INCLUDE INPUT SEARCH PATH specifies a sequence of directories which will be searched in turn 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).

Examples

! wsym.fsp - for aerodynamic sim with wind %include input directory: ../inc/kinematics AERO.FOR STAB.FOR %include input directory: ../inc/instruments GYRO.FOR ACCEL.FOR ! end of wsym.fsp

See Also

INCLUDE INPUT SEARCH PATH

INPUT DIRECTORY

PRIMARY INPUT DIRECTORY

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