[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
R_LastErr()
Retrieves the last occurred errorcode
------------------------------------------------------------------------------
Syntax
nErrorCode := R_LastErr()
Arguments
(None)
Returns
nErrorCode Last occurred errorcode
The values and descriptions of this return code
are defined in RCmpLib.CH.
See also the item ErrorCodes in this guide.
Description
This function can be used in combination with one of the following
functions :
R_CmpStr(), RCmpList() and R_DCmpStr()
After calling one of these functions you can use R_LastErr() to
determine which error did occur.
(The errorcode is not returned by these functions).
Example
#include "RCmpLib.CH"
LOCAL aCmpError := CP_ERRMSG && Array with messages
USE TEST NEW
*-- Try to compress the memo-field Test->Txt
Test->Txt := R_CmpStr ( Test->Txt )
IF R_LastErr() != CP_OKAY
*-- Determine & display error
?'Error: ' + aCmpError [ R_LastErr() ]
ELSE
?'String compressed ....'
ENDIF
More examples can be found in the demo program RCmpDemo.PRG.
.
See Also:
R_CmpStr()
R_CmpList()
R_DCmpStr()
ErrorCodes
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson