contents.gifprev1.gifnext1.gif

SEARCH_QUIETLY

Description:

The only difference between SEARCH and SEARCH_QUIETLY is that when a match is not found in SEARCH, a 0 value is returned and the error TPU$_STRNOTFOUND is signaled. When a match is not found in SEARCH_QUIETLY, no error message is signaled.

SEARCH_QUIETLY searches for a keyword, pattern, or string specified in the first parameter and returns a range with the matched characters. When ANCHOR is used in the first parameter, the search begins at the cursor's present location. UNANCHOR, the default, allows the search to begin anywhere after the previous pattern. All other keywords that may be used as the first parameter are self-explanatory as to what is to be matched in the search except REMAIN, which will search for a match from the current position to the end of the line.

A search may be done in forward direction, in which case it would begin at the start of a buffer or range as so designated in the fourth parameter. In a reverse search, it would begin at the end of a buffer or range as so designated in the fourth parameter.

SEARCH_QUIETLY works in the default NO_EXACT (third parameter), which allows it to search for the pattern or string indicated in the first parameter ignoring its case or diacritical markings. The third parameter may be set to EXACT, in which case the search will match only occurrences with the same case and diacritical markings as the original pattern or string. Another option for the third parameter is to select the first integer to pay attention to case but not diacritical markings, or the second integer to ignore case but match diacritical markings.

Syntax:

range := SEARCH_QUIETLY ( pattern, direction )

range := SEARCH_QUIETLY ( pattern, direction, method )

range := SEARCH_QUIETLY ( pattern, direction, method, {buffer | range} )

Valid values for direction are: FORWARD or REVERSE.

Valid values for method are: EXACT or NO_EXACT.

Errors:

TPU$_BADKEY Invalid keyword.

TPU$_CONTROLC Execution aborted by [CTRL-C].

TPU$_ILLPATAS Invalid partial pattern assignment.

TPU$_NOCURRENTBUF Not in a buffer.