source: tests/enum_tests/input.cfa @ c329bca

Last change on this file since c329bca was 3ac5fd8, checked in by Peter A. Buhr <pabuhr@…>, 3 months ago

first attempt changing end-of-file to an exception

  • Property mode set to 100644
File size: 351 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        try {
9                for () {
10                        try {
11                                sin | e;
12                        } catch( missing_data * ) {
13                                sout | "missing data";
14                                continue;                                                               // try again
15                        } // try
16                        sout | e | "= " | value( e );
17                } // for
18        } catch( end_of_file * ) {
19        } // try
20} // main
Note: See TracBrowser for help on using the repository browser.