CLS StatementSummaryClears the screen. Syntax
CLS Remarks and ExamplesThe CLS statement clears the console display and returns the cursor to the upper left corner of the screen. The entire console display will be set to the text background color. By default this is a medium gray color. To change the text background color, use the TEXTBGCOLOR statement. Sample program: 10 PRINT "Press any key to clear the screen." 20 X$ = GETCHAR$ 30 CLS 40 PRINT "The screen has been cleared." 50 PRINT "Press any key to clear the screen using green on black text." 60 X$ = GETCHAR$ 70 TEXTCOLOR 0, 255, 0 : REM Green color made of red = 0, green = 255, blue = 0 80 TEXTBGCOLOR 0, 0, 0 : REM Black color made of red = 0, green = 0, blue = 0 90 CLS 100 PRINT "The screen has been cleared with green on black text." 110 END RUN Copyright 2006-2008, Kevin Matz, All Rights Reserved. |
|