On 27 July 2013 18:30, David Korn <[email protected]> wrote:
> cc:  [email protected]  [email protected]          
> [email protected]
> Subject: Re: Re: [ast-users] Problems with (( !b ... )) and bools...
> --------
>
>
>> Could you change the enum code to allow that using _Bool.true and
>> _Bool.false refer to their numeric values? That might just solve the
>> problem by making the numeric values accessible without breaking
>> backwards compatibility.
>>
>> Irek
>>
>
> That won't work since it is incompatable.
>
> enum Color=(red white blue)
> Color=(x=3 blue=11)
> print $((Color.blue))
>
> It is 11 now.  If you change it to use the enumeration constant it
> would break this script.
>
> Perhaps
>         print $(( (Color)blue))
> would work the way type case is done in C.
>
> Alternatively
>         Color c
>         print $((c.blue))

That sounds OK for me.

Lionel
_______________________________________________
ast-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-users

Reply via email to