Last change
on this file since d6b7d1d 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
|
Rev | Line | |
---|
[1842167] | 1 | #include <fstream.hfa> |
---|
| 2 | #include <enum.hfa> |
---|
| 3 | |
---|
| 4 | int main() { |
---|
[1ad112a5] | 5 | enum(int ) E { BBB = 3, AAA, AA, AB, B, CB, AC }; |
---|
[1842167] | 6 | E e; |
---|
| 7 | |
---|
[3ac5fd8] | 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.