Subtract Method for LCNumeric

This method subtracts the value of one LCNumeric object from the value of another LCNumeric object , storing the result in the current object.

Defined In

LCNumeric

Syntax

Call numericThird. Subtract (numericFirst, numericSecond)

Parameters

Parameter

Description

numericFirst

The initial value from which to subtract numericSecond.

numericSecond

The value to subtract from numericFirst.

Usage Notes®

The numericThird must have been initialized prior to the call, for example it cannot be Nothing.

This method is also useful if numericThird is the same as one of the arguments, as in the following example statement:

remainingAmt.Subtract(remainingAmt, rowAmount)

Example

Option Public
Uselsx "*lsxlc" 
Sub Initialize
  Dim num1 As New LCNumeric
  Dim num2 As New LCNumeric
  Dim diff As New LCNumeric
  num1.Value = 98765.4321
  num2.Value = 12345.6789
  Call diff.Subtract (Num1, Num2)
  Print "The difference of the two numbers is " & diff.Text
End Sub

Example Output

The difference of the two numbers is 86419.7532.