Sample External Command: fmatch

Provides several matching functions for FORTRAN programs.

Scope: View

Syntax

Description

The fmatch command provides matching for labels, subprogram units, statement functions, DO loops and IF/ENDIF control structures.

It first checks that the word under the cursor is a matchable one, then searches for the label, subprogram, or statement function declaration corresponding to it.

For DO loop or IF/ENDIF matching, place the cursor on the relevant control word then issue the fmatch command. fmatch searches for the end of the loop or the ENDIF/IF corresponding to the IF/ENDIF, taking account of nesting. If successful, it marks a block between the current line and the one found.

If the word under the cursor is unsuitable for matching, or no match is found, an error message is displayed.

Example
Place the cursor on a label, subprogram or function reference, and type on the command line:

fmatch

The fmatch command is available as a sample external command macro. For details on fmatch and how it works, read the source code in the lxfmatch.c file.

Note: The lxfmatch.c file is found in the /usr/vatools/extras directory.

The lxfmatch.c file is found in the product_installation\extras directory.


Application Programming Interface Overview contains general information about creating and adding new commands using a library of subroutines.

Building External Commands Written in the C Language describes how to build external commands.

Sample External Command: match
Sample Extenal Command: proto