[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]

LIST

TYPE: Command
FORMAT: LIST [[<first-line>]-[<last-line>]]

Action: The LIST command allows you to look at lines of the BASIC program currently in the memory of your Commodore 64. This lets you use your computer's powerful screen editor, to edit programs which you've LISTed both quickly and easily.

The LIST system command displays all or part of the program that is currently in memory on the default output device. The LIST will normally be directed to the screen and the CMD statement can be used to switch output to an external device such as a printer or a disk. The LIST command can appear in a program, but BASIC always returns to the system READY message after a LIST is executed.

When you bring the program LIST onto the screen, the "scrolling" of the display from the bottom of the screen to the top can be slowed by holding down the ConTRoL <CTRL> key. LIST is aborted by typing the <RUN/STOP> key.

If no line-numbers are given the entire program is listed. If only the first-line number is specified, and followed by a hyphen (-), that line and all higher-numbered lines are listed. If only the last line-number is specified, and it is preceded by a hyphen, then all lines from the beginning of the program through that line are listed. If both numbers are specified, the entire range, including the line-numbers LISTed, is displayed.

EXAMPLES of LIST Command:
   LIST            (Lists the program currently in memory.)

   LIST 500        (Lists line 500 only.)

   LIST 150-       (Lists all lines from 150 to the end.)

   LIST -1000      (Lists all lines from the lowest through 1000.)

   LIST 150-1000   (Lists lines 150 through 1000, inclusive.)

   10 PRINT "THIS  IS LINE 10"
   20 LIST                             (LIST used in Program Mode)
   30 PRINT "THIS  IS LINE 30"

[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]
This page has been created by Sami Rautiainen.
Read the small print. Last updated November 14, 1998.