May 2005
Intermediate to advanced
506 pages
9h 23m
English
O hateful error, melancholy's child!
The C++ functions presented in the foregoing chapters embody mechanisms for analyzing whether during the execution of a called C function an error or other situation has occurred that requires a particular response or at least a warning. The functions test whether the passed variables have been initialized and evaluate the return value of the called C functions:
LINT f (LINT arg1, LINT arg2) { LINT result; int err; if (arg1.status == E_LINT_INV) LINT::panic (E_LINT_VAL, "f", 1, __LINE__); if (arg2.status == E_LINT_INV) LINT::panic (E_LINT_VAL, "f", 2, __LINE__); // Call C function to execute operation; error code is stored in err err = f_l ...Read now
Unlock full access