A command which causes lines of the current program which contain the specified string to be listed to the console.
LIST IF *FX LIST IF Please press <ENTER> to continue
You can specify the range of line numbers to be listed in a similar manner to LIST. For example,
LIST 100,2500 IF DEF
Will list all the lines between 100 and 2500 which contain the keyword DEF.
Keywords are tokenised before the search begins. Consequently, you can use LIST IF to find lines with particular commands in them.
LIST IF PROC LIST IF DEF
LIST IF is very useful for locating the lines in a program which define or use functions or procedures.
Because keywords are tokenised wherever they occur in the command line, you cannot use LIST IF to search for a string (including a star command) which contains a keyword. For example, the following will not work:
LIST IF *LOAD LIST IF DO YOU WANT TO PRINT THE RESULTS?
You cannot search for the 'left' form of those pseudo-variables which have two forms (PTR#=, PAGE=, TIME=, TIME=, LOMEM=, HIMEM=) because the 'right' form is assumed when the name is tokenised. Consequently,
LIST IF TIME
will find line 20 but not line 10 in the following program segment
10 TIME=20 20 now=TIME
You cannot search for 'keywords' which are not tokenised in the context of the program. For example,
LIST IF LOAD
will not list lines containing
ZLOAD=1 PROCLOAD FNLOAD "LOAD" REM LOAD
because LOAD is not tokenised in any of these lines.
The internal format of line numbers (GOTO 1000, for example) may spuriously match a search string of three characters or less.
- LIST IF <string>
- LIST <n-const> IF <string>
- LIST <n-const>, IF <string>
- LIST ,<n-const> IF <string>
- LIST <n-const>,<n-const> IF <string>