[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 06:23:50 +0100 |
On Thu, 5 Feb 2009 15:18:44 +1030
"Daniel O'Connor" <address@hidden> wrote:
> You can define it like so..
> #define LCD_CUSTOM_CHAR_FOO "\012"
>
> then you can do..
> char example[] = "foo" LCD_CUSTOM_CHAR_FOO "bar";
>
> You might be able to do something more clever but I don't know how :)
Thanks Daniel (and Ivan as well, off-list), that worked a treat ! :-)
Only drawback I found, is that I must now have TWO #defines for each and
every custom character: one #define to represent the character as a
string, so I can embed it into a string, and also all the #defines I
already had, which represent the actual numerical value, for when I
need to print an individual/discrete character rather than print a
string. It's not the end of the world, but not very elegant either, so
if anybody has a solution to make do with only one define per character,
I am all ears ;-)
--
Vince
- [avr-gcc-list] Strings: escape sequence to insert arbitrary hex value ?, Vincent Trouilliez, 2009/02/04
- 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 <=
- [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?, David Brown, 2009/02/05
- Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?, Chris Kuethe, 2009/02/05
- RE: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?, Schwichtenberg, Knut, 2009/02/05
- Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?, Chris Kuethe, 2009/02/05
- Re: [avr-gcc-list] Re: Strings: escape sequence to insert arbitrary hex value ?, Juergen Harms, 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 ?, 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