Command @...CLEAR Foundation

Positions the cursor and erases a screen area.

Syntax
@ <nTop>, <nLeft> [ CLEAR [TO <nBottom>, <nRight>] ]
Parameters
<nTop>
<nTop> is an integer numeric value specifying the top screen row for the area to erase. The four arguments <nTop>, <nLeft>, <nBottom> and <nRight> determine the screen coordinates of the entire area whose contents are erased.
<nLeft>
<nLeft> is an integer numeric value specifying the left screen column for the erased area.
CLEAR
If the option CLEAR is not included, only the screen row specified by <nTop> from <nLeft> to MaxCol() is erased.
<nBottom>
<nBottom> is an integer numeric value specifying the bottom screen row for the erased area. The default value is MaxRow().
<nRight>
<nRight> is an integer numeric value specifying the right screen column for the erased area. The default value is MaxCol().
Description

The screen command @...CLEAR erases an area of the screen by outputting blank spaces (Chr(32)) in the current default color. The cursor is then set to the position specified by <nTop> and <nLeft> and the functions Row() and Col() return these values. When the option CLEAR is not specified, only the screen row specified by <nTop>, from <nLeft> to MaxCol(), is overwritten with blank spaces. If the TO option is missing, blank spaces are output from the position <nTop>, <nLeft> to the bottom right screen corner.

Examples
@...CLEAR
// The example demonstrates several ways to use 
// @...CLEAR. The screen is first filled with a uniform 
// character. Then, various sections are overwritten with 
// blank spaces in another color. 

PROCEDURE Main 

   SetColor( "N/BG")        // fill screen 
   @ 0, 0, MaxRow(), MaxCol() BOX Replicate(Chr(176),9) 

   SetColor( "N/G") 

   @  0,25                  // erase only one row 

   @ 20,10 CLEAR            // erase area to bottom/right 

   @ 10,15 CLEAR TO 15,45   // specify all four coordinates 

RETURN 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.