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

Divide Equal Fn Function
Basic Extensions Class

Public Function DivideEqualFn( _
      ByRef rLeft As Variant _
    , ByVal vRight As Variant _
    ) As Variant

"Divide Equals" or "Assign And Return Division"
Divide rLeft by vRight, assign the result back into rLeft, and also return that value.
Similar to the C language "/=" assignment operator in the case where that assignment is treated as an expression.

       Dim dblValue As Double
       dblValue = 2.5
    for example
       DivideEqualFn(dblValue, 2) = 1.25
       dblValue = 1.25
See also:
    DivideEqual Subroutine
    Div Function
    TimesEqualFn Function
    PlusEqualFn Function
    MinusEqualFn Function
Definition (Visual Basic):
    DivideEqualFn = rLeft / vRight
    rLeft = rLeft / vRight
Definition (C):
    #define DivideEqualFn(rLeft, vRight) (rLeft /= vRight)
rLeft: Numeric or date value which is divided by vRight. The result of the division is assigned back into the variable passed via rLeft (unless that value happens to be passed-by-value) and the result is also returned.
vRight: The numeric value by which rLeft is divided.

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