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

In the case of files to the disk and cassette tape, they are not properly CLOSEd by the CLR statement. The information about the files is lost to the computer, including any incomplete buffers. The disk drive will still think the file is OPEN. See the CLOSE statement for more information on this.

EXAMPLE of CLR Statement:
   10 X=25
   20 CLR
   30 PRINT X

   RUN
   0

   READY

CMD

TYPE: I/O Statement
FORMAT: <file number> [,string]

Action: This statement switches the primary- output device from the TV screen to the file specified. This file could be on disk, tape, printer, or an I/O device like the modem. The file number must be specified in a prior OPEN statement. The string, when specified, is sent to the file. This is handy for titling printouts, etc.

When this command is in effect, any PRINT statements and LIST commands will not display on the screen, but will send the text in the same format to the file.

To re-direct the output back to the screen, the PRINT# command should send a blank line to the CMD device before CLOSEing, so it will stop expecting data (called "un-listening" the device).


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