Changeset 211 for Include/com
- Timestamp:
- Apr 11, 2007, 9:49:17 PM (18 years ago)
- Location:
- Include/com
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/com/currency.ab
r208 r211 8 8 Class Currency 9 9 Public 10 Sub Currency() 11 cy = 0 12 End Sub 13 10 14 /* 11 15 Sub Currency(x As CY) … … 201 205 Return HIDWORD(cy) Xor LODWORD(cy) 202 206 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 203 212 Private 204 213 cy As CY -
Include/com/index.ab
r200 r211 5 5 #require <com/vbobject.ab> 6 6 #require <com/currency.ab> 7 #require <com/decimal.ab> -
Include/com/variant.ab
r208 r211 519 519 520 520 Const Function ValCy() As Currency 521 Dim r = ChangeType(VT_CY) 522 ValCy = New Currency 523 ValCy.Cy = GetQWord(VarPtr(r.val)) 521 524 End Function 522 525 523 526 Sub ValCy(x As Currency) 527 Clear() 528 SetQWord(VarPtr(v.val), x.Cy) 529 v.vt = VT_CY 524 530 End Sub 525 531 … … 570 576 'ValArray 571 577 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 573 590 574 591 Function PtrToVariant() As *VARIANT … … 591 608 End Sub 592 609 593 594 610 Static Sub Move(ByRef dst As VARIANT, ByRef src As VARIANT) 595 611 dst = src
Note:
See TracChangeset
for help on using the changeset viewer.