このメソッドは、2 つの Currency 値を比較し、その関係を返します。
LCCurrency
Result = thisCurrency.Compare(baseCurrency)
パラメータ |
説明 |
---|---|
baseCurrency |
LCCurrency。thisCurrency を比較する基準となる Currency 値。 |
値 |
説明 |
---|---|
結果 |
Long。比較の結果 (以下のいずれか)。 |
Result > 0 (正): thisCurrency は baseCurrency より大きい。 |
|
Result < 0 (負): thisCurrency は baseCurrency より小さい。 |
|
Result = 0: thisCurrency は baseCurrency と等しい。 |
Option Public
Uselsx "*lsxlc"
Sub Initialize
Dim num1 As New LCCurrency //For LEI
Dim num2 As New LCCurrency
num1.Value = 123.456789
num2.Value = 123
If (num1.Compare (num2) = 0) Then
Print "The first number is the same as the second."
Elseif (num1.Compare (num2) > 0) Then
Print "The first number is greater than the second."
Else
Print "The first number is less than the second."
End If
End Sub
The first number is greater than the second.