[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] C Escape sequence.
From: |
Joerg Wunsch |
Subject: |
Re: [avr-gcc-list] C Escape sequence. |
Date: |
Sun, 18 Jun 2006 17:28:36 +0200 |
User-agent: |
Mutt/1.5.11 |
As dimax un wrote:
> The plain old ANSI C has option of putting octal numbers in strings
> like \ooo.
> For example: "Hello\007World" is actually: {'h' 'e' 'l' 'l' 'o' 0x07
> 'W' 'o' 'r' 'l' 'd' 0x00}
> It is less nice but much more portable.
It is similarly (un)portable. As of ANSI C89/ISO C90, the octal
escape sequence doesn't end right away after three digits but only at
the first non-octal character (or end of string), just like the
hexadecimal escape sequence. Hence there are still situations where
you might have to split up the strings -- only less likely since the
valid range for octal digits is less than half the range of valid
hexadecimal digits.
--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)