[Ace-users] [tao-users] tao_idl and enum

Martin Corino mcorino at remedy.nl
Tue Feb 5 01:32:03 CST 2008


Hi,

On Tuesday 05 February 2008, khan_069 wrote:
> Hi
>
> I am using TAO1.5 and when i compile a IDL file containing following
> enumeration
>
> enum test{false=0,true=1};
>
> it throws error saying "Illegal syntax following enum body statement"
>
> but i remove explicit assignment in enum like
>
> enum test{false,true};
>
> this works properly
>
> Any idea why the first syntax is not allowed?

Because this not compliant with CORBA IDL enum syntax.
CORBA IDL does not allow to set arbitrary values for enumerators.
The second form is the only allowed form.

regards,
Martin Corino.


-- 
----------------------------------------------------------------------
                           Martin J.N. Corino | Remedy IT Expertise BV
          Postbus 101 |  2650 AC Berkel en Rodenrijs | The Netherlands
                       tel: +31 (10) 522 0139 | fax: +31 (33) 246 6511
                                  World Wide Web: http://www.remedy.nl
----------------------------------------------------------------------



More information about the Ace-users mailing list