Pelles C forum

Pelles C => Feature requests => Topic started by: tommy on October 06, 2005, 05:13:51 PM

Title: Multibyte character literals
Post by: tommy on October 06, 2005, 05:13:51 PM
Pelle, can you please add support for multibyte character literals?
Title: Multibyte character literals
Post by: tommy on October 06, 2005, 05:32:48 PM
For instance: 'char' -> 0x72616863
Title: Multibyte character literals
Post by: Pelle on October 06, 2005, 11:00:03 PM
You mean something like this?

Code: [Select]

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


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

Pelle
Title: Multibyte character literals
Post by: tommy on October 07, 2005, 12:36:06 AM
No, I mean like:
Code: [Select]
if (*(int*)ptr == 'shor' && *(ptr+4) == 't') { ... }
It would be useful (e.g. in string comparisons) instead of writing 'shor' as :
Code: [Select]
's' | ('h'<<8 ) | ('o'<<16) | ('r'<<24)
or writing it as a hexadecimal value... You see?
Title: Multibyte character literals
Post by: Pelle on October 07, 2005, 06:46:24 PM
Same difference...

Pelle