NO

Author Topic: Multibyte character literals  (Read 4468 times)

tommy

  • Guest
Multibyte character literals
« on: October 06, 2005, 05:13:51 PM »
Pelle, can you please add support for multibyte character literals?

tommy

  • Guest
Multibyte character literals
« Reply #1 on: October 06, 2005, 05:32:48 PM »
For instance: 'char' -> 0x72616863

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Multibyte character literals
« Reply #2 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
/Pelle

tommy

  • Guest
Multibyte character literals
« Reply #3 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?

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Multibyte character literals
« Reply #4 on: October 07, 2005, 06:46:24 PM »
Same difference...

Pelle
/Pelle