// exceptions
extern "C" int rtl_printf (char *str, ...);

extern void function_in_other_file(int);


int main () {
    char myarray[10];
    try {
	// The function function_in_other_file raises an exception
	// before 10 times.
	for (int n=0; n<=10; n++)    
	    function_in_other_file(n);
	
	rtl_printf ("ERROR: Loop ended.. But it shouldn't!!.\n");
    }
    catch (int a) {
	rtl_printf ("OK: Exception correctly caught [%d]\n",a);
    }
    return 0;
}
