Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- RLIB 3.0a Reference - <b>debugging aid</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Debugging Aid

   To make program debugging a little easier, all RLIB functions maintain
   an error value which can be retrieved by a call to the RLIBERROR()
   function.  Normal function completion will always set this value to
   zero.  Any non-zero value is an indication of some level of failure in
   the last RLIB function called.

   This error value is also used by some RLIB functions to return more
   specific error information to the calling routine.  In such a case the
   error was not fatal (or an invalid syntax error) but merely an
   additional bit of information on the result of the function operation.
   A good example is the OPENED() function where the RLIBERROR() value
   returns details on why the files were not opened successfully.

   If you find that during your application development testing phase, a
   particular routine is not operating correctly, and the routine calls
   one or more RLIB functions, fire up the Clipper debugger and, at the
   point in question, evaluate RLIBERROR() to get the last error value.
   This can be a tremendous time saver in tracking down missing or
   invalid RLIB parameters.

   One additional technical note, RLIBERROR() simply maintains a PUBLIC
   variable named rliberror, and this variable is always visible.  Rather
   than making explicit calls to RLIBERROR(), you may set a breakpoint
   (in Clipper Summer '87) or to a tracepoint (in Clipper 5.0) to the
   expression RLIBERROR != 0.  In this manner your debugging execution
   will stop at the point of failure, when RLIBERROR becomes non-zero.
   Below is a table of all of the RLIBERROR error codes and their
   meanings.  These numbers were assigned sequentially as the RLIB
   functions were coded and modified, so they are not in any logical
   order and are not necessarily grouped by function.

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