Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
A version of this page is also available for
4/8/2010
This structure is used to store a currency value.
Syntax
typedef CY CURRENCY; |
Remarks
A currency number is stored as an 8-byte, two's complement integer, scaled by 10,000 to give a fixed-point number with 15 digits to the left of the decimal point and 4 digits to the right. This representation provides a range of 922337203685477.5807 to -922337203685477.5808. The CURRENCYdata type is useful for calculations involving money, or for any fixed-point calculation where accuracy is particularly important.
The CURRENCYdata type is defined as the union of a structure containing two bytes and a 64-bit integer, using the following code:
Copy Code | |
---|---|
typedef union FARSTRUCT tagCY { struct { #ifdef _MAC long Hi; unsigned long Lo; #else unsigned long Lo; long Hi; #endif }; LONGLONG int64; } CY; |
Requirements
Header | oaidl.h |
Windows Embedded CE | Windows CE 2.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |