17.07.2013 Views

GWBASIC User's Manual

GWBASIC User's Manual

GWBASIC User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

GW-BASIC <strong>User's</strong> Guide<br />

CLS Statement<br />

Purpose:<br />

To clear the screen.<br />

Syntax:<br />

CLS [n]<br />

Comments:<br />

n is one of the following values:<br />

Value of n Effect<br />

0 Clears the screen of all text and graphics<br />

1 Clears only the graphics viewport<br />

2 Clears only the text window<br />

If the graphics viewport is active, CLS without argument clears only the viewport. If the graphics<br />

viewport is inactive, CLS clears the text window.<br />

If the screen is in alpha mode, the active page is cleared to the currently selected background<br />

color (see the SCREEN and COLOR statements).<br />

If the screen is in graphics mode, the entire screen buffer is cleared to background color.<br />

The screen may also be cleared by pressing CTRL-HOME, or by changing the screen mode with the<br />

SCREEN or WIDTH statements.<br />

CLS returns the cursor to the upper-left corner of the screen, and sets the last point referenced to<br />

the center of the screen.<br />

If the VIEW statement has been used, CLS clears only the last viewport specified.<br />

Examples:<br />

1 CLS<br />

This clears the screen.<br />

file:///C|/Documents%20and%20Settings/Lorenzo/Desktop/GW%20Basic/CLS.html28/03/2004 21.29.18

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!