Please enable JavaScript to view this site.

ESL Documentation

Action Statement

Find a specified string of text in a textual region.

find in TR_NAME [from [column] COL_NO [ line] line_NO] STRING_SV

TR_NAME

The identifier for a textual region.

column COL_NO

An integer value representing a column number in the textual region that you want to use as the starting position of the search. If you omit a from clause, the search begins at the current text cursor position.

line line_NO

An integer value representing a line number in the textual region.

STRING_SV

A string value that is the object of the find.

Description

ESL searches for the specified string from the current position of the text cursor, unless you specify a from clause. If the string is found, the text cursor moves to the first character in the first occurrence of the specified string, and the found built-in function is set to true. If the string is not found, the text cursor does not move, and the found built-in function is set to false.

If the cursor already lies on the first character of the string when you execute a find statement, the found built-in function is set to true, but the cursor does not move.

If the program is compiled with External Strings, then any string literals used in this statement will be externalized.

Example

 

response to Search

 find in Document_TR from 1 1 SearchString

 if (found) then

         change Document_TR window position to

         column 1 line ycursor of Document_TR

 end if