xHarbour Reference Documentation > Command Reference |
Clears the contents of the screen.
@ <nTop>, <nLeft> [ CLEAR [TO <nBottom>, <nRight>] ]
The @...CLEAR command is used to clear a rectangular area on the screen in text mode applications. This is accomplished by displaying white space characters in the specified region using the standard color value of SetColor().
After the screen is cleared, the cursor is positioned at the top, left corner of the cleared rectangle. The new cursor position is reflected by the Row() and Col() functions.
See also: | @...BOX, CLEAR SCREEN, DispBox(), Scroll(), SetColor(), SetPos() |
Category: | Output commands |
Source: | rtl\scroll.c, rtl\setpos.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example demonstrates various possibilities of // erasing the screen and parts thereof. PROCEDURE Main SetColor( "W+/B" ) CLEAR SCREEN SetColor( "W+/R" ) @ 2, 0 // deletes the second row @ 20, 40 CLEAR // erase area to bottom/right @ 5, 30 CLEAR TO 15, 55 // use all four coordinates RETURN
http://www.xHarbour.com