FIX: Type Mismatch Error If Use VAL Function on Big Hex Value (95431)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition for Windows 2.0
- Microsoft Visual Basic Standard Edition for Windows 3.0
- Microsoft Visual Basic Professional Edition for Windows 2.0
- Microsoft Visual Basic Professional Edition for Windows 3.0
- Microsoft Visual Basic Standard Edition for Windows 1.0
- Microsoft Visual Basic for MS-DOS
- Microsoft Cinemania for Windows 1993 edition
- Microsoft QuickBASIC 4.5
This article was previously published under Q95431 SYMPTOMS
Using the VAL function on a large hexadecimal number (greater than or equal
to the hexadecimal value 80000000) embedded in a string can incorrectly
cause a "Type mismatch" error. This occurs only when the hexadecimal number
contains an ampersand (&) at the end of the string.
WORKAROUND
To reproduce the problem run the following code:
PRINT VAL("&H80000000&")
You get a "Type mismatch" error. To prevent the error, remove the last
ampersand (&) character.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This problem has been corrected in Visual
Basic version 4.0.
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | kbbug kbfix KB95431 |
---|
|