Ignore:
Timestamp:
Sep 18, 2007, 12:10:41 AM (17 years ago)
Author:
イグトランス (egtra)
Message:

SPrintF関連の追加。関数FloatToChars, FormatFloatE, FormatIntegerUと列挙体FormatFlags。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Include/com/currency.ab

    r267 r335  
    2828    End Sub
    2929*/
     30/*
    3031    Const Function Operator +() As Currency
    3132        Return New Currency(This)
    3233    End Function
    33 
     34*/
    3435    Const Function Operator -() As Currency
    3536        Dim ret = New Currency
     
    5859    Const Function Operator /(y As Variant) As Double
    5960        Dim vx = New Variant(This)
    60         Dim ret= vx / y
     61        Dim ret = vx / y
    6162        Return ret.ValR4
    6263    End Function
    6364
    6465    Const Function Operator /(y As Currency) As Double
    65         Return This / New Varinat(y)
     66        Dim vx = New Variant(This)
     67        Dim vy = New Variant(y)
     68        Dim ret = vx / vy
     69        Return ret.ValR4
    6670    End Function
    6771
     
    7983
    8084    Static Function Compare(x As Currency, y As Currency) As HRESULT
    81         Return VarCyCmp(x, y)
     85        Return VarCyCmp(x.cy, y.cy)
    8286    End Function
    8387
    8488    Static Function Compare(x As Currency, y As Double) As HRESULT
    85         Return VarCyCmpR8(x, y)
     89        Return VarCyCmpR8(x.cy, y)
    8690    End Function
    8791
    8892    Static Function Compare(x As Double, y As Currency) As HRESULT
    89         Dim ret = VarCyCmpR8(y, x)
     93        Dim ret = VarCyCmpR8(y.cy, x)
    9094        Select Case ret
    9195            Case VARCMP_LT
     
    140144    Const Function Operator <=(y As Currency) As Boolean
    141145        Dim c = Compare(This, y)
    142         Return result = VARCMP_LT Or result = VARCMP_EQ
     146        Return c = VARCMP_LT Or c = VARCMP_EQ
    143147    End Function
    144148
    145149    Const Function Operator <=(y As Double) As Boolean
    146150        Dim c = Compare(This, y)
    147         Return result = VARCMP_LT Or result = VARCMP_EQ
     151        Return c = VARCMP_LT Or c = VARCMP_EQ
    148152    End Function
    149153
    150154    Const Function Operator >=(y As Currency) As Boolean
    151155        Dim c = Compare(This, y)
    152         Return result = VARCMP_GT Or result = VARCMP_EQ
     156        Return c = VARCMP_GT Or c = VARCMP_EQ
    153157    End Function
    154158
    155159    Const Function Operator >=(y As Double) As Boolean
    156160        Dim c = Compare(This, y)
    157         Return result = VARCMP_GT Or result = VARCMP_EQ
     161        Return c = VARCMP_GT Or c = VARCMP_EQ
    158162    End Function
    159163
Note: See TracChangeset for help on using the changeset viewer.