Last change
on this file since e561551 was 1842167, checked in by Peter A. Buhr <pabuhr@…>, 14 months ago |
add test for reading in enumerators
|
-
Property mode
set to
100644
|
File size:
307 bytes
|
Line | |
---|
1 | #include <fstream.hfa>
|
---|
2 | #include <enum.hfa>
|
---|
3 |
|
---|
4 | int main() {
|
---|
5 | enum(int) E { BBB, AAA, AA, AB, B, CB, AC };
|
---|
6 | E e;
|
---|
7 |
|
---|
8 | for () {
|
---|
9 | try {
|
---|
10 | sin | e;
|
---|
11 | } catch( missing_data * ) {
|
---|
12 | sout | "missing data";
|
---|
13 | continue; // try again
|
---|
14 | } // try
|
---|
15 | if ( eof( sin ) ) break;
|
---|
16 | sout | "\"" | e | "\"";
|
---|
17 | } // for
|
---|
18 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.