CLEAR ERC
Clear Error Condition Variable
This directive resets the ERC system variable to 0, its initial value.
Syntax
Section titled “Syntax”CLEAR ERCRemarks
Section titled “Remarks”You can use this directive in tandem with the ERC system variable. In general you will use ERC=numeric-value to specify an error code; after testing for the error, you can use CLEAR ERC to reset the value of ERC to 0.
This directive has no effect on the ERR system variable.
Examples
Section titled “Examples”OPEN (1, ERC=3) "NOFILE"IF ERC=3 PRINT ERCCLEAR ERCIf NOFILE does not exist, the output will be 3. After CLEAR ERC is executed, the value contained in ERC will be reset to 0.
See also
Section titled “See also”ERC system variable
SET ERC directive
From the Thoroughbred Basic Language Reference, Volume I: A–E, version 8.9.1. Open this page in the PDF