How To Convert Decimal Integers to Hexadecimal Strings (192303)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q192303 SUMMARY
The following Microsoft Knowledge Base article describes how to convert
decimal integers to a hexadecimal string:
95717 How to Convert Decimal Numbers to Hexadecimal Numbers
However, the function in the article is limited in the size of the integer
it can convert. In Visual FoxPro, the TRANSFORM() function can be used to
convert decimal integers to hexadecimal strings. However, TRANSFORM()
cannot handle negative decimal integers (for example, TRANSFORM(-2, "@0")).
This article demonstrates how to use the DecToHex function to convert any
decimal integer (up to DWORD in size) to a hexadecimal string, regardless
of the sign of the integer.
REFERENCES
For additional information, please see the following articles in the
Microsoft Knowledge Base:
95717 How to Convert Decimal Numbers to Hexadecimal Numbers
155389 How To Convert Values to Hexadecimal Format with Xbase
(c) Microsoft Corporation 1998. All Rights Reserved. Contributions by Mike
A. Stewart, Microsoft Corporation.
Modification Type: | Minor | Last Reviewed: | 6/29/2004 |
---|
Keywords: | kbcode kbhowto KB192303 |
---|
|