This is the mail archive of the
ecos-devel@sources.redhat.com
mailing list for the eCos project.
Re: CDL values
- From: GONZALEZ Laurent <laurent dot gonzalez at trango-systems dot com>
- To: ecos-devel at sources dot redhat dot com
- Date: Tue, 5 Apr 2005 17:31:45 +0200
- Subject: Re: CDL values
- Organization: Trango Systems
- References: <1112713912.1985.120.camel@hermes>
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