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>function:</b> divide() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Function:    DIVIDE()

Purpose:     Divide numbers with built in divide by zero protection.

Syntax:      DIVIDE( dividend, divisor )

Arguments:   dividend    - Number to be divided

             divisor     - Number to divide it by.

Returns:     <dividend> / <divisor> with divide by zero protection.

Description: This is a simple function but proves to be invaluable when
             doing division math.  Invariably in reports you always end up
             not trapping some circumstance where a number may be divided
             by zero and cause a runtime error.  Very bad!  With
             consistent use of this UDF in place of simple division, you
             can rest easy.

Notes:       If parameters are omitted or are non-numeric, zero is
             returned and RLIBERROR() set.

Example:     ? DIVIDE(10,2)             && result = 5

Source:      RL_DIVID.PRG

See also:    BIN2DEC(), DEC2HEX(), HEX2DEC()

See Also: BIN2DEC() DEC2HEX() HEX2DEC()

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