TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: PETER HAYWOOD
from: JONATHAN DE BOYNE POLLARD
date: 1998-03-09 20:20:00
subject: multichar constant

It's been a month, but I see that no-one has replied to this in the interim:
 BW>> By fooling around and doing stuff like this...
 BW>>      cout << "Expression /a in hex = " << hex << '/a' << endl;
 BW>> and checking the output, I've realized that Microsoft v 8.00 is
 BW>> 'seeing' this two char constant right-to-left, while Borland sees it
 PH> What two char constant? That's a FUBAR constant. It has no meaning.
Yes it has.  The C++ language has four kinds of character literal:
        'c'         Single character character literal, type `char'
        'ab'        Multi-character character literal, type `int'
        L'c'        Single character wide character literal, type `wchar_t'
        L'ab'       Multi-character wide character literal, type `wchar_t'
The values of both kinds of multi-character literal are implementation 
defined, so they do have a definite meaning (albeit one that varies from 
implementation to implementation).
The code above contains a multi-character character literal.
 ¯ JdeBP ®
--- FleetStreet 1.19 NR
---------------
* Origin: JdeBP's point, using Squish (2:440/4.3)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.