Find

Use

Locates and prints a specified string.

Command Syntax

FIND [/IGNORE] [string]

where:

string
Is a sequence of characters

Description

The FIND command locates a line in the source file containing a specified string and reports that line.

Quotation marks may be used to delimit the string but they are not required. If the string is not specified, the default value will be the string specified in the previous Find. If there is no string specified in the first instance of Find, an error message will be generated.

The debugger finds the first occurrence of the string after the current file position in the source file, then prints the line containing that occurrence of the string. By default, Find is case-sensitive, so that string "ABC" differs from "abc" and "Abc". When the ignore case option is turned on with Find, it is case-insensitive, so that the string "ABC" is the same as the string "abc" and "Abc".

If the string is not found, the current source file pointer is positioned at the last line of the user program.

Example

In this example, the string "main" is located.

CodeWatch> FIND main
 108:       /* main procedure */

If the string is not identical in terms of case to the string in the source file, it will not be found. For example:

CodeWatch> FIND MAIN 
String not found: "MAIN"

In the following example, the search is case-insensitive.

CodeWatch> FIND /IGNORE MAIN
 108:       /* main procedure */