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>rlib function overview</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
RLIB Function Overview

   Parameter Syntax Verification

   All of the RLIB functions employ parameter verification to ensure that
   the correct parameters were supplied for the function to properly
   execute.  If one or more parameters is missing or is of the wrong data
   type, the RLIB function is designed to return gracefully to the
   calling routine without crashing the application.  Nothing is more
   annoying than to have a function bomb an application albeit due to a
   coding error.  However, there is another side to this coin.  If an
   application crashes, at least it is painfully evident that something
   is wrong.  By gracefully returning it is not always clear that a
   function did not perform as expected.

   Take for instance the Clipper Summer '87 implementation of the
   SCROLL() function.  If the fifth parameter, the number of lines to
   scroll, is omitted, SCROLL() simply returns without doing anything.
   This is good because it does not crash your application.  However, it
   may not be immediately clear that something is not working.  If the
   program crashed with even a cryptic error message such as "Proc:
   SCROLL  Line: 0  Parameter Error" at least you know something is wrong
   within the SCROLL() function.  (Note: The Clipper 5.01 version of the
   SCROLL() function clears the screen if no parameters are provided.)


   RLIB Error Reporting

   RLIB functions give you the best of both worlds.  As mentioned above,
   all RLIB functions verify the correct number of and parameter types.
   If a parameter is missing or of the incorrect type, the RLIB function
   will not bomb but will return to the calling routine.  What the RLIB
   function will do is set a flag via the RLIBERROR() function.
   RLIBERROR() maintains a public variable named <rliberror> which is a
   numeric value that indicates the last error that may have occurred.  A
   normal value is zero.  Through the use of RLIBERROR() the application
   programmer can set break points in the Clipper debugger during testing
   to trap any syntax errors in RLIB functions.  To learn more about
   RLIBERROR() see the function description in the function reference and
   Appendix A - RLIB Error Codes.

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