Re: \x and strings
- From: "Carl Daniel [VC++ MVP]" <cpdaniel_remove_this_and_nospam@xxxxxxxxxxxxxxx>
- Date: Thu, 14 Apr 2005 06:29:33 -0700
Martin Richter [MVP] wrote:
> Hallo Frank!
>
>> The escape sequence for embedded bytes is three characters following
>> the \x so your "unicode" example is the correct way for non-unicode
>> strings, a\x001bc will work properly for single byte characters.
>
> Sure? I am confused now...
>
> I just found this in the docs:
> Mobile and Embedded Development
> Embedded Operating System Development
> Windows CE
> Windows CE .NET
> Product Documentation
> Development Tools
> Microsoft Embedded Visual C++ 4.0
> C/C++ Language Reference
> C++ Language Reference
> Lexical Conventions
> Literals
> C++ Character Constants
>
> Octal escape sequences, specified in the form \ooo, consist of a
> backslash and one, two, or three octal characters. Hexadecimal escape
> sequences, specified in the form \xhhh, consist of the characters \x
> followed by a sequence of hexadecimal digits. Unlike octal escape
> constants, there is no limit on the number of hexadecimal digits in an
> escape sequence.
>
> Anybody here who has a copy of the standard?
That's consistent with what the standard says in 2.13.2:
escapesequence:
simpleescapesequence
octalescapesequence
hexadecimalescapesequence
simpleescapesequence: one of
\' \" \? \\
\a \b \f \n \r \t \v
octalescapesequence:
\ octaldigit
\ octaldigit octaldigit
\ octaldigit octaldigit octaldigit
hexadecimalescapesequence:
\x hexadecimaldigit
hexadecimalescapesequence hexadecimaldigit
-cd
.
- Follow-Ups:
- Re: \x and strings
- From: Martin Richter [MVP]
- Re: \x and strings
- References:
- \x and strings
- From: lallous
- Re: \x and strings
- From: Martin Richter [MVP]
- Re: \x and strings
- From: John Carson
- Re: \x and strings
- From: Martin Richter [MVP]
- Re: \x and strings
- From: Frank Hickman [MVP]
- Re: \x and strings
- From: Martin Richter [MVP]
- \x and strings
- Prev by Date: Re: 64k limit for C++ structure
- Next by Date: ISAPI Filter - HTTP_USER_AGENT
- Previous by thread: Re: \x and strings
- Next by thread: Re: \x and strings
- Index(es):
Relevant Pages
|