[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Strings: escape sequence to insert arbitrary hex valu
From: |
Vincent Trouilliez |
Subject: |
Re: [avr-gcc-list] Strings: escape sequence to insert arbitrary hex value ? |
Date: |
Thu, 5 Feb 2009 07:52:49 +0100 |
On Thu, 5 Feb 2009 16:28:55 +1030
"Daniel O'Connor" <address@hidden> wrote:
> I had a go at getting that to work with preprocessor magic but I don't think
> it's possible (I'm no CPP guru though).
>
> Actually, how about..
>
> #define FOO "\070"
> #define getOrd(x) (x)[0]
Oh, works impeccably, thanks Daniel ! :-)
As a newbee, so far I have never ventured into using #defines for
anything else than plain constants, but looks like making "functions"
is not that difficult it appears in your example, yet incredibly
useful/practical ! :o)
--
Vince, learning a little bit (pun intented !) every day...
- RE: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?, (continued)
- RE: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?, Dave Hansen, 2009/02/05
- Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?, Vincent Trouilliez, 2009/02/05
- Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary, lucio, 2009/02/05
- Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary, Jim Brain, 2009/02/05
- Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary, Vincent Trouilliez, 2009/02/05
- Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?, David Kelly, 2009/02/05
- RE: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?, Dave Hansen, 2009/02/05
- Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?, Joerg Wunsch, 2009/02/09
- Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?, Vincent Trouilliez, 2009/02/05
- Re: [avr-gcc-list] Strings: escape sequence to insert arbitrary hex value ?, Daniel O'Connor, 2009/02/05
- Re: [avr-gcc-list] Strings: escape sequence to insert arbitrary hex value ?,
Vincent Trouilliez <=
- Re: [avr-gcc-list] Strings: escape sequence to insert arbitrary hex value ?, Daniel O'Connor, 2009/02/05
RE: [avr-gcc-list] Strings: escape sequence to insert arbitrary hexvalue ?, Michael, 2009/02/06