[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 ERRORACT()
 Recommends an action for a DOS error that has occurred previously
------------------------------------------------------------------------------
 Syntax

     ERRORACT() --> nActionCode

     Warning!  This function requires DOS 3.1 or higher.

 Returns

     ERRORACT() returns a numeric code that provides more information on how
     to react to the last DOS error.  Coding is as follows:

     Table 12-2: DOS Error Action Codes
     ------------------------------------------------------------------------
     Code    Definition
     ------------------------------------------------------------------------
     1       Try several times, then ask user
     2       Try several times with pauses, then ask user
     3       Ask user for data
     4       Leave program normally
     5       Leave program as soon as possible
     6       Ignore
     7       User should correct error and try again
     ------------------------------------------------------------------------

 Description

     DOS reacts to errors in several ways.  One of the best known and least
     preferred by programmers is the question:  "(A)bort, (R)etry, (I)gnore".
     ERRORACT() tells you how the application should react to the last DOS
     error that occurred.

 Example

     Show an error that requires the program to terminate:

     nAction  :=  ERRORACT()
     IF nAction = 4
        ? "Unfortunately, the program must be terminated!"
        QUIT
     ENDIF


See Also: ERRORBASE() ERRORCODE() ERRORORG()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson