3.3 Calling readnums

readnums can be called just like any other subroutines, as shown in listing 3.


Listing 3:callreadnums
 
1void test(void
2{ 
3  int x[200]; 
4  unsigned how_many; 
5 
6  how_many = readnums(”/bogus/path”, x, sizeof(x)/sizeof(x[0]));  
7}

What if /bogus/path is a bogus path? Execution is not resumed on line 6! Instead, execution is resume with a matching catch statement of a try block. In other words, if a subroutine wants to intercept an exception, it needs some special statements.