<-- Previous || Up || Next -->

Divide On Err Rtn Zero Function
Math Reals Class

Public Function DivideOnErrRtnZero( _
      ByVal vDividend As Variant _
    , ByVal vDivisor As Variant _
    ) As Variant

"Divide; On Error Return Zero"
Divide two real numbers.
Return 0 (zero) in case of division by zero and other errors.

    DivideOnErrRtnZero(3, 10) = .3
    DivideOnErrRtnZero(3, 0) = 0
See also:
    DivideOnErrRtnZeroVerify Subroutine
    Div Function
    DivideOffsetByOne Function
vDividend: Real number which is to be divided by the other number.
vDivisor: Number of times that vDividend is to be divided.
Note: Function returns 0 (zero) if errors occur during the division, such as when vDivisor is 0 (zero).

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.