home *** CD-ROM | disk | FTP | other *** search
- *****************************************************************
- FUNCTION BACKCHAR (top, left, bottom, right, back_char, color)
- *****************************************************************
-
- * Fills a screen area with specified background character
-
- * Copyright(c) 1991 -- James Occhiogrosso
-
- LOCAL counter, old_color
-
- * Set default background if value not passed
- IF VALTYPE(back_char) == 'N'
- back_char = CHR(back_char)
- ELSEIF back_char == NIL .OR. VALTYPE(back_char) != 'C'
- back_char = CHR(176)
- ENDIF
-
- * Use current color if no color passed
- old_color = IF(VALTYPE(color) == 'C', ;
- SETCOLOR(color), SETCOLOR())
-
- * Set defaults for any coordinates not passed
- top = IF(VALTYPE(top ) == 'N', top , 0)
- left = IF(VALTYPE(left ) == 'N', left , 0)
- bottom = IF(VALTYPE(bottom) == 'N', bottom, MAXROW())
- right = IF(VALTYPE(right ) == 'N', right , MAXCOL())
-
-
- * Fill the display with background character
- back_line = REPLICATE(back_char, (right-left) + 1)
- FOR counter = top TO bottom
- @ counter, left SAY back_line
- NEXT
-
- * Restore original color and return
- SETCOLOR(old_color)
- RETURN NIL
-
-