home *** CD-ROM | disk | FTP | other *** search
- //
- // Module Name: AS_PAUSE.COD
- // Description: Procedure to display a message or errors in a window
- //
- {//
- // Enum string constants for international translation
- //
- enum error_msg1 = "[An error has occurred !! - Error message: ]+MESSAGE()",
- error_msg2 = "[Error # ]+lc_message",
- error_wait = " Press any key to continue..."
- ;
- }
- PROCEDURE Pause
- PARAMETER pc_msg
- *{replicate("-",69)}
- * Procedure to display a message or errors in a window
- * Parameters : pc_msg = message line
- *{replicate("-",69)}
- PRIVATE lc_msg
-
- IF TYPE("lc_message")="U"
- gn_error=ERROR()
- ENDIF
- lc_msg = pc_msg
- lc_option='0'
-
- ACTIVATE WINDOW Pause
- IF gn_error > 0
- IF TYPE("lc_message")="U"
- @ 0,1 SAY {error_msg1}
- ELSE
- @ 0,1 SAY {error_msg2}
- ENDIF
- ENDIF
-
- @ 1,1 SAY lc_msg
- WAIT "{error_wait}"
- DEACTIVATE WINDOW Pause
-
- RETURN
- *-- EOP: Pause WITH pc_msg
- // EOP AS_PAUSE.COD
-