This is the mail archive of the ecos-devel@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: CDL values


On Tue, 05 Apr 2005 09:11:52 -0600
Gary Thomas <gary@mlbassoc.com> wrote:

> I'd like to have a CDL variable, flavor data, whose value
> is specified as a single character.  I've not found any way
> to write this, other than using the ASCII HEX equivalent.
> 
> If I write this:
>   cdl_option XYZ {
>     flavor data
>     default_value 'a'
>   }
> I always get a syntax error.
> 
> Ideas?  Is this possible?
> 
> n.b. this is used in some C code where I'd like to say
>   a = ch - XYZ;
> instead of
>   a = ch = 'a';
> 

This is a bit ugly, but the following should do the job:

  cdl_option XYZ {
    flavor data
    default_value \"a\"
	define_format "'%s'"
  }

regards.

-- 
GONZALEZ Laurent
------------------------------------
Real-Time OS Team Leader
TRANGO Systems - Groupe ELSYS Design
74, avenue des Martyrs
38000 Grenoble
Tel: 33 (0)4 76 12 28 44
Fax: 33 (0)4 76 12 28 49
http://www.trango-systems.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]