NO

Author Topic: Multibyte character literals  (Read 2969 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: 1988
    • 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: 1988
    • http://www.smorgasbordet.com
Multibyte character literals
« Reply #4 on: October 07, 2005, 06:46:24 pm »
Same difference...

Pelle
/Pelle