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

2009-02-08 Thread Joerg Wunsch
David Kelly dke...@hiwaay.net wrote: Odds are that is an avr-gcc patch and not standard gcc. Am more certain the support of entering binary values is an avr-gcc enhancement because I see the patch file in the FreeBSD port. You're confusing that with binary constants, that are introduced by

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

2009-02-05 Thread Juergen Harms
I have made good experience using the fact that the compiler concatenates sub-strings. Just dumping examples from existing code: static char e_origin[] PROGMEM = \x1bAT\x00\x00\x14\x12\x01\x00C\x7F\x00 ; This example also illustrates one problem and its solution: the compiler has

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

2009-02-05 Thread Vincent Trouilliez
On Thu, 05 Feb 2009 07:58:26 +0100 David Brown david.br...@hesbynett.no wrote: Thanks to all the people who replied while I was away ! An alternative idea is to find an ASCII character that you don't need otherwise (say, ~), and use it in your strings. Then do on-the-fly conversion when

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

2009-02-05 Thread Dave Hansen
From: dke...@hiwaay.net On Thu, Feb 05, 2009 at 12:13:37AM -0700, Chris Kuethe wrote: On Thu, Feb 5, 2009 at 12:10 AM, Schwichtenberg, Knut wrote: As far as I know hex values won't work as expected but octal does! I used: static char s46[] __attribute__ ((progmem)) = Hei\342gas; /* 46

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

2009-02-05 Thread Vincent Trouilliez
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 ? I do happen to have question marks

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

2009-02-05 Thread David Kelly
On Thu, Feb 05, 2009 at 07:13:18PM +0100, Vincent Trouilliez wrote: 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

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

2009-02-05 Thread Dave Hansen
From: vincent.trouill...@modulonet.fr [...] 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