' Function Example DECLARE FUNCTION CLR$ (row AS INTEGER, col AS INTEGER) ' Procedure Example DECLARE SUB CLRP (row AS INTEGER, col AS INTEGER) ' Example of how to call the function and the procedure ' Uncomment below to test ' DIM A1 AS STRING ' A1 = CLR(5, 10) ' Calls the function ' ' CALL CLRP(5, 10) ' Calls the procedure FUNCTION CLR$ (row AS INTEGER, col AS INTEGER) DIM frow AS INTEGER FOR frow = row TO 25 ' QBasic line numbers go to 25 (1 to 25) LOCATE frow, col ' Move cursor to the specified row and column PRINT SPACE$(81 - col); ' Clear the line by printing spaces (80 characters) NEXT frow ' Return an empty string CLR = "" END FUNCTION SUB CLRP (row AS INTEGER, col AS INTEGER) DIM frow AS INTEGER FOR frow = row TO 25 LOCATE frow, col PRINT SPACE$(81 - col); ' Clear the line by printing spaces (80 characters) NEXT frow ' Make sure to clear the last line without scrolling LOCATE 25, col PRINT SPACE$(81 - col); END SUB