![](/images/backgrounds/286549/hp-sunsoft-pascal-4-0-users-manual-549395265x1.png)
11
DOMAIN | Argument domain exception |
SING | Argument singularity |
OVERFLOW | Overflow range exception |
UNDERFLOW | Underflow range exception |
TLOSS | Total loss of significance |
PLOSS | Partial loss of significance |
|
|
If your matherr() function returns a
program TestMatherr(output);
#include <math_p.h>
function matherr(var info: exception): integer; begin
case info.kind of
DOMAIN: begin
{ change sqrt to return
if substr(info.name^, 1, length('sqrt')) = 'sqrt' then begin info.retval :=
matherr := 1; { No exception message will be printed } end;
end; otherwise
matherr := 0;
end;
end;
begin
writeln('Error handling function');
end.
Math Libraries | 241 |