source: tests/enum_tests/input.cfa@ dd78dbc

Last change on this file since dd78dbc was 1ad112a5, checked in by Peter A. Buhr <pabuhr@…>, 14 months ago

update enumeration input test

  • Property mode set to 100644
File size: 318 bytes
Line 
1#include <fstream.hfa>
2#include <enum.hfa>
3
4int main() {
5 enum(int ) E { BBB = 3, 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 | "= " | value( e );
17 } // for
18}
Note: See TracBrowser for help on using the repository browser.