PRB: IsDigit Returns Wrong Value when Called from DLL

Last reviewed: January 15, 1998
Article ID: Q152150
The information in this article applies to:
  • Microsoft Windows Software Development Kit (SDK), version 3.1
  • Microsoft Visual C++, 16-bit Edition, versions 1.0, 1.5, 1.51, 1.52

SYMPTOMS

Under Windows 3.1 or Windows 95, when IsDigit() is called in a DLL, it returns TRUE if the characters are 240 and 248. IsDigit should return FALSE for these characters.

RESOLUTION

You can use SDK APIs instead of the C Run-time calls to avoid this problem.

Instead of calling:

   if (IsDigit(a))

you can call the following line to get the correct result:

   if (IsCharAlphaNumeric(a) && (!IsCharAlpha(a)))


Additional query words: MSVC

Keywords : kb16bitonly kbIntlDev
Version : 1.0 1.5 1.51 1.52 3.1
Platform : WINDOWS
Issue type : kbprb


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 15, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.