Changeset 478 for trunk/Include/com/currency.ab
- Timestamp:
- Mar 13, 2008, 9:06:43 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/com/currency.ab
r355 r478 2 2 3 3 #require <com/variant.ab> 4 5 #ifndef _COM_CURRENCY_AB6 #define _COM_CURRENCY_AB7 4 8 5 Namespace ActiveBasic … … 56 53 Return ret 57 54 End Function 58 /* 55 59 56 Const Function Operator /(y As Variant) As Double 60 57 Dim vx = New Variant(This) … … 69 66 Return ret.ValR8 70 67 End Function 71 */ 68 72 69 Const Function Operator +(y As Currency) As Currency 73 70 Dim ret = New Currency … … 131 128 Return c = VARCMP_LT 132 129 End Function 133 /* 130 134 131 Const Function Operator >(y As Currency) As Boolean 135 132 Dim c = Compare(This, y) … … 141 138 Return c = VARCMP_GT 142 139 End Function 143 */ 140 144 141 Const Function Operator <=(y As Currency) As Boolean 145 142 Dim c = Compare(This, y) … … 183 180 184 181 Const Function Cy() As CY 185 Returncy182 Cy = cy 186 183 End Function 187 184 … … 203 200 204 201 Override Function ToString() As String 205 Dim bs As BSTR 206 VarBstrFromCy(cy, LOCALE_USER_DEFAULT, LOCALE_USE_NLS, bs) 207 ToString = New String(bs As PCWSTR, SysStringLen(bs) As Long) 208 SysFreeString(bs) 202 /*Using*/ Dim bstr = New BString 203 Dim bs As BSTR 204 VarBstrFromCy(cy, LOCALE_USER_DEFAULT, LOCALE_USE_NLS, bs) 205 bstr.Attach(bs) 206 ToString = bstr.ToString 207 bstr.Dispose() 'End Using 209 208 End Function 210 209 … … 223 222 End Namespace 'COM 224 223 End Namespace 'ActiveBasic 225 226 #endif '_COM_CURRENCY_AB
Note:
See TracChangeset
for help on using the changeset viewer.