L - Locate Character

Locates a string.

Command

L

Action

The Locate Character command allows you to locate a string. You have the option of locating the first occurrence of the string or locating all occurrences of the string within a specified number of lines.

To invoke the Locate Character command, press L. The Status/Command Line prompts:

CS LOCATE :

Note

CS indicates that the search will be case-sensitive. Use the = command to toggle between case-sensitive and -insensitive.

Enter the string to be located.  For example, the string to be located is "STRUNG". The Status/Command Line continues the prompt:

CS LOCATE :STRUNG #lines, (A)ll, Ret=1st occur, 0=Exit :

Locate First Occurrence

To locate the first occurrence of the desired string beginning with the current line, press RETURN at the #lines  prompt.

The program searches for the string, stops and places the cursor at the string when the string is located. If the string is not found on the current screen, the line containing the string is displayed at the top of the screen as if a G (Go To Line Number) command had been issued to that line number.

If the string is not found, the Status/Command Line displays:

string not found - Press<Return>:

Press RETURN to return to the screen that was displayed before the L command was entered.

Locate all Occurrences

To locate all occurrences of the string, enter A at the #lines  prompt.

Each line containing the string to be located is displayed. The Status/Command Line then displays:

GOTO Line # :

This allows you to go to one of the lines containing the searched for string. Press RETURN to return to the screen display previous to the Locate Character command.

Multiline Locate

To locate multiple occurrences of the specified string, type the number of lines to be searched at the #lines  prompt.

The program searches through the specified number of lines and displays each line containing the desired string.  The Status/Command Line prompts:

GOTO Line# :

This allows you to go to one of the lines containing the searched for string. Press RETURN to return to the screen display previous to the Locate Character command.

Case sensitivity

You can choose whether the L command matches strings in a case-sensitive or -insensitive way. For example, if you search for "FRED", this will match "Fred", "FRED" and "fred" if the search is case-insensitive but only "FRED" if it is case-sensitive. Whether searches are case-sensitive or -insensitive can be selected as follows:

Note that, if you are editing multiple items, the current setting is retained when you open a new item.

Cancel

Type 0 (zero) at the #lines  prompt to cancel the Locate Character command.