RSetErrLock()
Sets the status of the error lock mechanism to true or false.
Synopsis
void RSetErrLock( bool lock);
Parameters
Parameter | Description |
---|---|
lock |
TRUE = Set the error lock FALSE = Do not set the error lock. |
Description
Sets the status of the error lock mechanism to true or false. Every function of the R control extension can set the error status to a value unequal to 0 if an error has occurred. If the error status is already unequal to 0 when an R control extension function is called, the execution of the function is skipped and the error status is not modified if the error lock mechanism is active.
Example
In this example an error status is created and then cleared.
#uses "CtrlR"
main()
{
int userData = 3; /*Sets the userData parameter to identify errors, see RLoadModel()*/
RSetErrLock(1); //Sets the error lock, see RSetErrLock()
REvalExp(userData, "1/0"); //Causes an error
DebugN(REvalExp(userData, "1+1"));//The debug cannot be executed
RClearErr(); //clears the error
DebugN(REvalExp(userData, "1+1"));//the debug is executed
}
Assignment
Availability
See also