Changeset 211 for Include/com


Ignore:
Timestamp:
Apr 11, 2007, 9:49:17 PM (18 years ago)
Author:
イグトランス (egtra)
Message:

Decimalを追加、OAIdl.abの一応の完成など

Location:
Include/com
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • Include/com/currency.ab

    r208 r211  
    88Class Currency
    99Public
     10    Sub Currency()
     11        cy = 0
     12    End Sub
     13
    1014/*
    1115    Sub Currency(x As CY)
     
    201205        Return HIDWORD(cy) Xor LODWORD(cy)
    202206    End Function
     207
     208    Function Equals(y As Currency) As Boolean
     209        Dim c = Compare(This, y)
     210        Return c = VARCMP_EQ
     211    End Function
    203212Private
    204213    cy As CY
  • Include/com/index.ab

    r200 r211  
    55#require <com/vbobject.ab>
    66#require <com/currency.ab>
     7#require <com/decimal.ab>
  • Include/com/variant.ab

    r208 r211  
    519519
    520520    Const Function ValCy() As Currency
     521        Dim r = ChangeType(VT_CY)
     522        ValCy = New Currency
     523        ValCy.Cy = GetQWord(VarPtr(r.val))
    521524    End Function
    522525
    523526    Sub ValCy(x As Currency)
     527        Clear()
     528        SetQWord(VarPtr(v.val), x.Cy)
     529        v.vt = VT_CY
    524530    End Sub
    525531   
     
    570576    'ValArray
    571577
    572     'ValDecimal
     578    Const Function ValDecimal() As Decimal
     579        Dim p = VarPtr(v) As *Decimal
     580        Return New Deciaml(p[0])
     581    End Function
     582
     583    Sub ValDecimal(x As Decimal)
     584        Clear()
     585        Dim p = VarPtr(v) As *Decimal
     586        p[0] = x.Dec
     587        v.vt = VT_DECIMAL '念の為
     588    End Sub
     589   
    573590
    574591    Function PtrToVariant() As *VARIANT
     
    591608    End Sub
    592609
    593 
    594610    Static Sub Move(ByRef dst As VARIANT, ByRef src As VARIANT)
    595611        dst = src
Note: See TracChangeset for help on using the changeset viewer.