#: 3948 S3/Languages
29-May-90 18:20:36
Sb: #3938-#C error trapping
Fm: Bruce MacKenzie 71725,376
To: Dan Charrois 70721,1506 (X)
Dan,
Yes, there is a way to trap math errors in C. You have to set up a signal
trapping function with the intercept() function. When an error occurs the
signal trap is called. Usually, the signal trap simply sets an appropriate
flag and returns. The main program must check the flag at the appropriate time
to see if an error has occurred and then take some action.
There are 2 Replies.
|