ADT
ast-experimental
enum
forall-pointer-decay
jacob/cs343-translation
new-ast-unique-expr
pthread-emulation
qualifiedEnum
Last change
on this file since 4ae968e was ea593a3, checked in by Andrew Beach <ajbeach@…>, 4 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
|
Rev | Line | |
---|
[ea593a3] | 1 | // Cross a Try Statement With Finally Clause
|
---|
| 2 | #include <exception.hfa>
|
---|
| 3 | #include <stdlib.hfa>
|
---|
| 4 |
|
---|
| 5 | int 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.