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

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

Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?


From: Richard Urwin
Subject: Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?
Date: Mon, 19 Sep 2005 00:33:09 +0100
User-agent: KMail/1.7.2

On Sunday 18 Sep 2005 23:33, Vincent Trouilliez wrote:
> If I may ask one more question before, I happen to have a problem
> define one of the units : " °C".
>
> This '°' degree sign is not ASCII but extended ASCII, and my LCD
> module has a japanese (!) page code for extended characters.
> So I need to squeeze a numerical value within my string definition,
> but I really can't manage to do it, and the string part of struct
> which itself is part of an array, can't help :-/
>
> So, I tried :
>
> const struct param __ATTR_PROGMEM__ param_list[] = {
>       { ... , {0xDF, "C "}, ... },
>       ...
> };
>
> but the compiler promptly insulted me !! ;o)

0xDF is not a string, it's a number.

Try 
{ ... , {"\xDF" "C "}, ... },

I used two concatonated strings because otherwise the C will be taken as 
part of the hex sequence.

-- 
Richard Urwin




reply via email to

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