home *** CD-ROM | disk | FTP | other *** search
- *****************************************************************
- FUNCTION READABORT (msg_line)
- *****************************************************************
-
- * Asks for operator confirmation before aborting READ
-
- * Copyright(c) 1991 -- James Occhiogrosso
-
- # include "inkey.ch"
-
- LOCAL message := 'Abandon this record? Y/N '
- LOCAL old_screen := '', ret_value := .F.
-
- * Test for Escape key
- IF LASTKEY() = K_ESC
-
- * If message line not passed, default to bottom screen row
- msg_line := IF(VALTYPE(msg_line) = 'N', msg_line, MAXROW())
-
- * If AEDBAR is in use AEDMSG displays message.
- * Otherwise, message appears on passed line number.
-
- IF .NOT. AEDMSG(message)
- * AEDBAR not in use, use message line
- old_screen = SCRNSAVE(msg_line, 0, msg_line, MAXCOL())
- CENTERON(msg_line, message)
- ENDIF
-
- * Move cursor to end of message text
- @ ROW(), COL() SAY ''
- ?? CHR(7)
-
- IF OPCONFIRM()
- * Operator confirms abandoning record
- ret_value = .T.
- ENDIF
-
- * If we saved a screen area, restore it.
- IF .NOT. EMPTY(old_screen)
- SCRNREST(old_screen)
- ENDIF
-
- ENDIF
-
- RETURN (ret_value)
-
-
-