Subtract Method for LCCurrency
This method subtracts one LCCurrency value from another, producing the result. The result is stored in the object that is making the call.
Defined In
LCCurrency
Syntax
Call currencyResult.Subtract (currency1, currency2)
Parameters
Parameter |
Description |
---|---|
currency1 |
LCCurrency. This is the initial LCCurrency from which you want to subtract the second currency. |
currency2 |
LCCurrency. The amount to be subtracted from currency1. |
Usage Notes®
The currencyResult may be the same object as one of the arguments, for example:
Call remainingAmt.Subtract(remainingAmt, deduction)
CurrencyResult 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 //For HEI
Dim num2 As New LCCurrency
Dim diff As New LCCurrency
num1.Value = 98765.4321
num2.Value = 12345.6789
Call diff.Subtract (Num1, Num2)
Print "The difference of the two currencies is " & diff.Text
End Sub
Example Output
The difference of the two currencies is 86419.7532.