Multibyte character constants????

diamond@tkovoa diamond at tkou02.enet.dec.com
Sat Jun 30 12:36:46 AEST 1990


In article <1990Jun28.221927.6823 at idt.unit.no> arnej at solan1.solan.unit.no writes:
>>We have stumbled across the subject of multibyte character
>>constants.  Is this defined anywhere?
>>For example, if we say
>>main(){printf("%d\n",'AB');}
>>what should the output be?

In article <1824 at tkou02.enet.dec.com> I wrote:
>Exactly the opposite.  The standard did not even just leave it undefined
>by saying nothing.  The standard explicitly says that it's undefined.

Sorry, the standard actually says it's implementation defined.
So your vendor's manual does have to say what the compiler does with them.
(I happened to read something else in TFM that day which was in fact
undefined, and then mixed them up in my memory.  Sorry for misleading
anyone.)

>It does not have to compile.  It does not have to execute.  It it does,
>it can print anything, or exec rogue.

This is still true.  Only, your vendor DOES have to tell you what it will do.
And you still would not use it at all in a portable program.
-- 
Norman Diamond, Nihon DEC     diamond at tkou02.enet.dec.com
This is me speaking.  If you want to hear the company speak, you need DECtalk.



More information about the Comp.std.c mailing list