FIX: Type Mismatch Error If Use VAL Function on Big Hex ValueLast reviewed: October 30, 1997Article ID: Q95431 |
1.00 7.10 4.50 | 1.00 2.00 3.00
MS-DOS | WINDOWSkbprg kbbuglist The information in this article applies to: - Standard and Professional Editions of Microsoft Visual Basic for Windows, versions 2.0 and 3.0- Microsoft Visual Basic programming system for Windows, version 1.0 - Standard and Professional Editions of Microsoft Visual Basic for MS-DOS, version 1.0- Microsoft Basic Professional Development System (PDS) for MS-DOS, version 7.1- Microsoft QuickBASIC for MS-DOS, version 4.5
SYMPTOMSUsing 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.
WORKAROUNDTo 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.
STATUSMicrosoft 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.
|
Additional reference words: buglist2.00 buglist1.00 buglist4.50 buglist7.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |