home *** CD-ROM | disk | FTP | other *** search
- *****************************************************************
- * * 09/92 ONSAVE.PRG *
- *****************************************************************
- * * Author's Name: Jeb Long *
- * * *
- * * Description: *
- * * This program illustrates the use of ON() function *
- * * to retrive ON command commands. *
- *****************************************************************
- ON ERROR DO ERRPROC WITH 1
- ON KEY LABEL CTRL+F2 DO THING1
- *
- * ... Do some processing
- *
- ON KEY LABEL CTRL+F2 DO THING2
- *
- * ... Do some more processing
- *
- ON KEY LABEL CTRL+F3 DO THING3
- *
- * ... Do even more processing
- *
- WAIT WINDOW
- ON KEY LABEL CTRL+F2
- ON ERROR
- RETURN
- ***********************************************************
- * ERRPROC - Performs error recovery operations
- *
- PROCEDURE ERRPROC
- PARAMETER ErrLoc
- SaveONerr = ON("ERROR") && Save the ON ERROR action
- SaveCtrlF2 = ON ("KEY", "CTRL+F2")
- ON KEY LABEL CTRL+F2
- ON ERROR DO ERR2 && Do another error procedure
- *
- * ... Do error recovery operation
- *
- ON ERROR &SaveONerr && Reestablish original ON action
- ON KEY LABEL CTRL+F2 &SaveCtrlF2
- RETURN
- *************************************************************
- * ERR2 - Secondary error recovery program
- *
- PROCEDURE ERR2
- * ... Process error that occurs in ERRPROC
- RETURN