SCAN

SCAN

Top  Previous  Next

 

The SCAN verb prompts for entry of one or more text strings. Records that meet any other selection criteria given on the command line are tested for the presence of the search strings at any position in the record, displaying the lines that contain the specified strings.

 

SCAN {DICT} file.name

{USING {DICT} file.name}

{selection.clause}

{sort.clause}

{record.id...}

{ALL}

{FOR string1 string2 ...}

{FROM select.list.no}

{STRINGS file.name record.id}

 

The SCAN command is equivalent to SEARCH with the DISPLAY option.

 

Multiple search strings may be specified. The default action is to prompt for entry of search strings, terminating the list by entering a blank response to the prompt. Two  alternative methods of specifying the search strings are available. Use of the FOR keyword allows search strings to be specified on the command line. Use of the STRINGS keyword takes the search strings from the specified file and record, each field being taken as a separate search string.

 

The default action is for the search to scan only the record data. Use of the ALL keyword extends the search to include the record id.

 

The optional NO.CASE keyword makes the search string test case insensitive.

 

By default, the SCAN command shows the lines that contain any of the supplied search strings. This can be changed by use of the ALL.MATCH keyword which specifies that the selected records must contain all of the supplied strings.

 

 

Example

 

SCAN BP FOR "!SORT"

 

The above command would search all QMBasic source programs in the BP file for references to the !SORT() subroutine and display the lines on which they occur.

 

 

See also:

SEARCH