Re: [Vala] Minor features request (about structs and enums)



pancake wrote:
I was also thinking on implementing a enumflags keyword that acts like
enum, but shift bits instead of increasing the value. so you can do:

enumflag Mode {
 READ
 WRITE
}

MyOpen (Mode.READ | Mode.WRITE);

That's what

 [Flags]
 enum MyEnum {
     // ...
 }

should do. I have just tested it, but it doesn't.


Best regards,

Frederik



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]