HP 3000 Manuals

Search Forward [ HP EDIT Reference Manual ] MPE/iX 5.0 Documentation


HP EDIT Reference Manual

Search Forward 

Purpose 

Searches forward for text specified by the search pattern.

Default Syntax 

[n] /

where n is a count indicating the nth forward occurrence of the search
pattern.  The default value of n is 1.

Description 

This command searches from the current cursor position [REV BEG]within a
block or file to the end of the block or [REV END]file for text that
matches the search pattern.

Command Process 

When HP EDIT finds text that matches the search pattern:

   *   Text scrolls up, if necessary

   *   The cursor moves to the first character of the matched text

   *   The entire matched text is highlighted (if Highlight Match
       parameter of the Set Options screen is enabled)

   *   The message Found.  appears

You can execute this command repeatedly.  Each time you execute the
command, HP EDIT responds to matched text as described.

If you execute the command and no remaining text matches the search
pattern, HP EDIT displays Not found.  on the message line and sounds the
terminal bell.  This response also occurs if you execute the command and
none of the text in the entire file matches the search pattern.

Requirements 

In order for this command to perform its function, you must predefine a
search pattern using the Define Search Pattern command, the Define Search
Pattern From Text command, or the Define Search Pattern From Macro
command.

Procedure 

To sequentially search forward for the search pattern: 

   1.  Ensure that the cursor is positioned anywhere before the search
       pattern, or move the cursor to the top of the file.

   2.  Press the / key, or press the Search/Replace function key,
       followed by the Search Forward function key.  If any of the text
       in the file matches the search pattern, HP EDIT moves the cursor
       to the first character of the matched text and highlights the
       entire matched text.
[REV BEG]

To sequentially search forward within a block for the search pattern: 

   1.  Ensure that the cursor is positioned within the block.

   2.  Go to step 2, above.[REV END]

To search forward for a specific occurrence of the search pattern: 

   1.  Specify a count that represents the nth forward occurrence of the
       search pattern that you want HP EDIT to find from the current
       cursor location.

   2.  Press the / key, or press the Search/Replace function key,
       followed by the Search Forward function key.  HP EDIT moves the
       cursor to the first character of the nth occurrence and highlights
       the entire matched text.

Related Commands 

       Define Replace Pattern
       Define Replace Pattern From Text
       Define Search Pattern
       Define Search Pattern From Text
       Global Search And Replace Backward
       Global Search And Replace Forward
       Insert Replace Pattern
       Insert Search Pattern
       Search And Replace Backward
       Search And Replace Forward
       Search Backward



MPE/iX 5.0 Documentation