1.23
2.0
main
test-branch
|
Last change
on this file since 8f51b55 was a8ca3d3, checked in by Manchun Zheng <zmanchun@…>, 12 years ago |
|
implemented enumeration type; checked in tests languageFeatures/enum1.cvl and enum2.cvl, which currently fail because some problem from ABC.
git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@716 fb995dde-84ed-4084-dfe6-e5aef3e2452c
|
-
Property mode
set to
100644
|
|
File size:
208 bytes
|
| Line | |
|---|
| 1 | #include <civlc.h>
|
|---|
| 2 |
|
|---|
| 3 | enum hue { chartreuse, burgundy, claret=20, winedark };
|
|---|
| 4 |
|
|---|
| 5 | void main(){
|
|---|
| 6 | enum hue col, *cp;
|
|---|
| 7 |
|
|---|
| 8 | col = burgundy;
|
|---|
| 9 | cp = &col;
|
|---|
| 10 | if (*cp != claret)
|
|---|
| 11 | *cp = claret;
|
|---|
| 12 | $assert(col == 20);
|
|---|
| 13 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.