KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q38328: C 5.10 Doesn’t Implement Multibyte Integer Character Constants

Article: Q38328
Product(s): See article
Version(s): 5.10   | 5.10
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | | mspl13_c
Last Modified: 28-NOV-1988

Page 28 of the ANSI C draft proposal X3J11/88-001 describes an integer
character constant as being a sequence of one or more multibyte
characters enclosed in single quotation marks, e.g. 'a' or 'ab'.

Page 21 of the "Microsoft C 5.1 Optimizing Compiler Language
Reference Guide" states that an integer character constant
is formed by enclosing a single character from the representable
character set within single quotation marks. It makes no reference to
multibyte character constants (e.g. 'ab'). If a source file has the
character constant defined as follows, the error "C2015: Too many
chars in constant" is generated:

   int ch = 'ab';

This error is correct, because Microsoft C Version 5.10 does not
implement multi-character integer character constants.  Note that
page 29 of the draft standard says that such constructions are
"implementation-defined."

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.

Copyright Microsoft Corporation 1986-2002.