fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

SEARCH

Syntax:

SEARCH <scope> [ [ FOR ] <taget>> ]

where <scope> may be:

ALL FILES
FILE: <file name>
SUB-PROGRAM: <sub-program name>

where <target> may be:

ERRORS
ERROR <error number>
[ SYMBOL ] <symbol name>

Function:

The SEARCH command is used interactively to find the first occurrence of the target in the specified scope. If no target is specified the command changes the search scope.

The target may be a user-defined symbol. Symbols are specified by name alone, by sub-program name and local name, or by common block name and local name. A sub-program name is written before the symbol name and is separated from it by a percent character, for example: ANOVA%SUMSQ. If the target is a field of a structure, a component of a derived type or lies within an internal sub-program it may be specified by a complete heirarchy of parent-child names separated by % characters

A common block name is written before the local name and is enclosed in forward slashes, for example: /OUTCOM/SUMSQ.

The NEXT command is used to find subsequent occurrences of the target.

The SEARCH FOR EXTERNAL PARAMETERS command is described in a separate manual page. This command does not search the program for a target.

Where to Use this Command

Operating system command line No
Configuration file, config.fsp No
Specification (fsp) files, *.fsp No
Interactively, to FPT> prompt Yes
Interactive command files Yes
Embedded in the Fortran code No

Examples

FPT> search all files for errors

- Finds the first error of any type in the code.

FPT> search file anova.for for errors

- Finds the first error in the file anova.for.

FPT> search sub-program readdat

- Changes the scope but does not search. The FIND command will search within the sub-program readdat.

FPT> s all files for readdat%qsum

- Searches the entire code for the variable qsum defined (presumably in a module or common block) in the sub-program readdat. qsum may be found outside the sub-program readdat. The sub-program name is used in specifying the target, not the scope of the search.

FPT> sear sub-prog anova for /inpdat/

- Searches the sub-program anova for the common block name /inpdat/

FPT> sear sub-prog outsub for /inpdat/scale

- Searches the sub-program outsub for the variable scale declared in the common block /inpdat/.

See Also

FIND

NEXT

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