Multibyte character literals

Started by tommy, October 06, 2005, 05:13:51 PM

Previous topic - Next topic

tommy

Pelle, can you please add support for multibyte character literals?

tommy

For instance: 'char' -> 0x72616863

Pelle

You mean something like this?


int f(void)
{
   return 'abcd';
}


If so: probably - and only because MSVC seems to support it (I find it completely useless myself...)

Pelle
/Pelle

tommy

No, I mean like:if (*(int*)ptr == 'shor' && *(ptr+4) == 't') { ... }
It would be useful (e.g. in string comparisons) instead of writing 'shor' as :
's' | ('h'<<8 ) | ('o'<<16) | ('r'<<24)
or writing it as a hexadecimal value... You see?

Pelle

/Pelle