This is the mail archive of the ecos-discuss@sourceware.org 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: Assign a CDL value to TCL variable.


On Sun, 8 Jul 2012, Ilija Kocho wrote:

> Hi colleagues
> 
> Is there a way to assign a value of CDL option/component to a TCL
> variable. something equivalent to:
> 
>     cdl_option CYGFOO {
>         flavor data
>         calculated 5
>     }
> 
>   set cygbar some_function(CYGFOO)
> # Here cygbar == 5

Hi Ilija

Would not you use TCL's ``set'' command for that? E.g.

  cdl_package CYGPKG_FOO {
      cdl_option CYGGLO_FOOBAR {
          flavor data
          calculated [set ::foobar 5]
      }
  }

In such a case you'll find in pkgconf/foo.h

  #define CYGGLO_FOOBAR 5
  #define CYGGLO_FOOBAR_5

Sure that global TCL variable ``foobar'' will be set to 5 too.

HTH

Sergei


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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