avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex


From: Dave Hansen
Subject: RE: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?
Date: Thu, 5 Feb 2009 14:13:41 -0500

 From: address@hidden
[...]
>
>> ISO C99, section 6.4.4.4, p3:
>> the question-mark ?, [..] is representable according to the following table 
>> of escape
>> sequences: question mark? \?
>
> Interesting. I wonder why the standard deeemd it necessary to provide
> an escape sequence for the question mark ?
 
As other have mentioned, it's to prevent the substitution of trigraphs.  
Trigraphs are a way to express characters that either do not appear is the 
source character set, or are handled poorly by the development environment.  If 
trigraphs are enabled, then
 
   puts("Trigraphs??!");
 
will output "Trigraphs|" (IIRC).  To prevent this, you can use
 
   puts("Trigraphs?\?!");
 
Regards,
 
   -=Dave
 
 

 
_________________________________________________________________
Windows Liveā„¢: E-mail. Chat. Share. Get more ways to connect. 
http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t2_allup_howitworks_022009



reply via email to

[Prev in Thread] Current Thread [Next in Thread]