fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

NEXT

Syntax:

NEXT
NEXT ERROR
NEXT SYMBOL [:] <symbol>

Function:

The NEXT command is used interactively to locate objects in the code. It finds the next occurrence of the target in the current search scope, starting at the line following the cursor.

Scope:

The search scope is set by a TYPE or SEARCH command. It is a sub-program, a single file, or all files.

Target:

The NEXT command locates the next occurrence of the target in the current scope. If no target is specified, fpt searches for the target specified in the last SEARCH or FIND command. The cursor is moved to the target, and the lines at and around the target are displayed. fpt displays w1 lines above the line which contains the target and w2 lines below it, where w1 and w2 are the values set by the WINDOW command. The cursor is indicated by the symbol >> printed to the right of the line number if line numbering is turned on (See NUMBER LINES and LINE NUMBERING).

The target may be ERROR, for example:

FPT> next err

The next diagnostic of any type marked in the code is located.

The search 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 pecent character, for example: anova%sumsq. A common block name is written before the local name and is enclosed in forward slashes, for example: /outcom/sumsq. fpt locates the first occurrence of a matching symbol in the search scope. Note that a symbol which is specified by sub-program name and local name, but which occupies a location in a common block, may be found outside the specified sub-program. Note also that the same name may be used for several different objects within a program or even within a single sub-program (for instance, as a common block name, a variable name and a field name). fpt locates the first symbol which matches the target description.

The FIND command is used to find the first occurrence of the target.

Where to Use this Command

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

Examples:

FPT> find errors

FPT> n err

FPT> find readdat%qsum

FPT> n

See Also

DOWN
FIND
LINE NUMBERING
NUMBER LINES
SEARCH
SET SCOPE
TYPE
UP
WINDOW

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