Home Page


BASIC Handbook

Basic2 Commands
Disk Drives
PEEK's and POKE's
RAM Memory Map
ROM Memory Map
Screen Display
Sprite
ASCII and CHR$ Codes

eMail
email5-commodorecheetah.co.uk

Note: You will need to replace the '-' with the @ symbol.
This is to minimize spam.

My BASIC Quick Reference Guide

CLR
Abbreviation: C <SHIFT+L>

TYPE: Statement
FORMAT: CLR

Action: This statement makes available RAM memory that had been used but is no longer needed. Any BASIC program in memory is untouched, but all variables, arrays, GOSUB addresses, FOR...NEXT loops, user-defined functions, and files are erased from memory, and their space is mode available to new variables, etc.

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


Commodore Cheetah made by Allen Monks, started in the year 2000.