source:
CIVL/mods/dev.civl.com/examples/languageFeatures/enum1.cvl@
cb4d4f4
| Last change on this file since cb4d4f4 was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 234 bytes | |
| Line | |
|---|---|
| 1 | #include <civlc.cvh> |
| 2 | |
| 3 | enum hue { chartreuse, burgundy, claret=20, winedark }; |
| 4 | |
| 5 | void main(){ |
| 6 | enum hue col, *cp; |
| 7 | |
| 8 | col = burgundy; |
| 9 | |
| 10 | cp = &col; |
| 11 | $assert(*cp == 1); |
| 12 | if (*cp != claret) |
| 13 | *cp = claret; |
| 14 | $assert(col == 20); |
| 15 | } |
Note:
See TracBrowser
for help on using the repository browser.
