Add Method for LCCurrency

This method adds two LCCurrency values, producing the sum. The sum is returned to the object that is making the call.

Defined In

LCCurrency

Syntax

Call currencyTotal.Add(currency1, currency2)

Parameters

Parameter

Description

currency1

LCCurrency. The first of the two LCCurrencies to add.

currency2

LCCurrency. The second of the two LCCurrencies to add.

Usage Notes®

CurrencyTotal may be the same object as one of the arguments, for example:

Call runningTotal.Add(runningTotal, newAmount)

CurrencyTotal must have been initialized prior to the call, that is, it cannot be Nothing.

Example

Option Public
Uselsx "*lsxlc"  
Sub Initialize
  Dim num1 As New LCCurrency 
  Dim num2 As New LCCurrency
  Dim sum As New LCCurrency
  num1.Value = 12345.6789
  num2.Value = 12345.6789
  Call sum.Add (Num1, Num2)
  Print "The sum of the two currencies is " & sum.Text
End Sub

Example Output

The sum of the two currencies is 24691.3578