source: doc/theses/andrew_beach_MMath/code/cross-finally.cfa @ ea593a3

ADTast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since ea593a3 was ea593a3, checked in by Andrew Beach <ajbeach@…>, 3 years ago

First draft of all the exception benchmarks. There is an issue with the Cforall linking.

  • Property mode set to 100644
File size: 414 bytes
Line 
1// Cross a Try Statement With Finally Clause
2#include <exception.hfa>
3#include <stdlib.hfa>
4
5int main(int argc, char * argv[]) {
6        unsigned int times = 1;
7        unsigned int total_frames = 1;
8        if (2 < argc) {
9                times = strtol(argv[1], 0p, 10);
10        }
11        if (3 < argc) {
12                total_frames = strtol(argv[2], 0p, 10);
13        }
14
15        for (unsigned int count = 0 ; count < times ; ++count) {
16                 try {
17                        // ...
18                } finally {
19                        // ...
20                }
21        }
22}
Note: See TracBrowser for help on using the repository browser.