Add Method for LCNumeric
This method adds the values of two LCNumeric objects. The total is stored in the current object, overwriting any existing value.
Defined In
LCNumeric
Syntax
Call numericTotal. Add (numeric1, numeric2)
Parameters
Parameter |
Description |
---|---|
numeric1 |
The first of two values being added. |
numeric2 |
The second of two values being added. |
Usage Notes®
The numericTotal must have been initialized prior to the call, for example it cannot be Nothing.
This method is also useful if numericTotal is the same as one of the arguments, as in the following example statement:
runningTotal.Add(runningTotal, rowAmount)
Example
Option Public
Uselsx "*lsxlc"
Sub Initialize
Dim num1 As New LCNumeric
Dim num2 As New LCNumeric
Dim sum As New LCNumeric
num1.Value = 12345.6789
num2.Value = 12345.6789
Call sum.Add (Num1, Num2)
Print "The sum of the two numbers is " & sum.Text
End Sub
Example Output
The sum of the two numbers is 24691.3578.