The information in this article applies to:
SYMPTOMSCode using the function CSng() within Visual Basic is automatically converted to a CDbl by the compiler. CAUSEIf a string literal, such as 1.1, or a string variable is placed inside of the CSng function, Visual Basic converts the function to CDbl. The following code demonstrates the problem:
When you run a program containing this code, Visual Basic changes it to
this code:
WORKAROUNDTo work around the problem, use another function that operates on the string. Then place this result inside the CSng function. For example, use this:
STATUSThis bug was corrected in Microsoft Visual Basic version 4.0 for Windows. Additional query words: 3.00 buglist3.00 fixlist4.00
Keywords : |
Last Reviewed: January 20, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |