A search facility is available to allow the program text, regardless of the display mode, to be searched for a specific string or symbol. The search dialog box can be brought up with the search key (F3 or CTRL-F), alternatively select the Find option from within the Search menu. When a match is made the cursor is placed on the line containing the match. The Find Next (CTRL-N) and Find Previous (CTRL-P) keys can then be used to move between matched lines. While the workbench is processing a search it is possible to interrupt and cancel it by pressing ESC.
Find dialog box:
When the dialog box is displayed the search text defaults to the last actioned object, i.e. the last object to be placed into the command/status line. The search text can contain regular expressions and may optionally be case insensitive. It is always case insensitive if the search is restricted to symbols only. The search text field has a drop down containing previous search strings. The following options are available from this dialog box.
Search Direction | Action |
---|---|
Forwards | The Search will proceeded top-down. |
Backwards | The Search will proceeded bottom-up. |
One of the following searches can be performed.
Search | Action |
---|---|
From Beginning | The search will always start from the top of the source file. |
Selected Text | If set the search will only be carried out on the currently highlighted text. |
All Open Documents | If set the search will proceed through all loaded source files. This returns multiple results in one go, using the search results window. |
All Loaded Libraries | If set the search will proceed through all loaded Libraries. This returns multiple results in one go, using the search results window. |
Wrap Search | If the search reaches the end. Then it repositions itself at the start and continues. |
Only one of the following Search types may be set.
Search Type | Action |
---|---|
All Text | Searches for matches in all text. The search is without any consideration for the meaning of the symbols in a program. All characters are searched with the searching being done in units of lines. |
Symbols only | Searches for matches in symbols only. Different symbol types can be searched for by preceding the text with either a ( ' ) or a period to search for only subroutine labels or field variables respectively. Unix regular expressions are permitted. Searching is done on the symbol table and will only match variable names, subroutine names, field names, object names, or labels. |
Line numbers only | Searches for matches in line number references only. An alternative to LIST #. This restricts the search to line numbers referenced in GOTO, GOSUB, LOAD etc statements. It is meaningful only to use numeric search strings and wild cards do not apply. |
Literal strings | Matches simple quoted strings "....". If the checkbox for all occurrences is checked then the next string will be found irrespective of the contents. This can be used to systematically locate all the string literals in a program with a view to changing some to chevron international strings. If the checkbox is not checked then the literal string must match the text in the search box (which should be quoted). This mode of search will not match quoted text in comments. |
Chevrons | Matches multilingual strings enclosed in <<>> chevrons. If the checkbox for all occurrences is checked then the next chevron string will be found irrespective of the contents otherwise the search string must be matched. |
Undimmed Symbols | Finds next undimmed symbol occurrence. |
One or more of the following options can be set.
Search Option | Action |
---|---|
Caseless | This option toggles the search type. If set a caseless search is performed and if unset only text exactly matching the search text will be found. Searching on symbols is always caseless. |
Regular Expression | Allows UNIX regular expressions to be used as the search string. These must be true regular expressions. |
All Occurences | Used in literal and Chevron string searches. This is when we want to find any occurrence. |
The search results window provides you with a listing of all the results that match the requested search. You can then goto the required result by left-clicking it.
Search result window: