Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>erroract()</b> http://www.X-Hacker.org [<<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()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson