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

Plus Equal Fn Function
Basic Extensions Class

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

"Plus Equals" or "Assign And Return Addition"
Add vRight to rLeft, 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
       PlusEqualFn(dblValue, 2) = 4.5
       dblValue = 4.5
See also:
    PlusEqual Subroutine
    Addit Function
    MinusEqualFn Function
    TimesEqualFn Function
    DivideEqualFn Function
Definition (Visual Basic):
    PlusEqualFn = rLeft + vRight
    rLeft = rLeft + vRight
Definition (C):
    #define PlusEqualFn(rLeft, vRight) (rLeft += vRight)
rLeft: Numeric or date value to which vRight is added. The result of the addition 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 that is added to rLeft.

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