| 1 | @[flag] |
| 2 | enum FilePerm { |
| 3 | read |
| 4 | write |
| 5 | exec |
| 6 | } |
| 7 | |
| 8 | enum Flags { |
| 9 | bit0 |
| 10 | bit1 |
| 11 | bit2 |
| 12 | bit3 |
| 13 | } |
| 14 | |
| 15 | fn main() { |
| 16 | println(FilePerm.read > FilePerm.write) |
| 17 | println(FilePerm.write + FilePerm.exec) |
| 18 | println(FilePerm.write && FilePerm.exec) |
| 19 | |
| 20 | f := Flags.bit0 | Flags.bit1 |
| 21 | println(~f) |
| 22 | } |
| 23 |