home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
xc212os2.zip
/
SAMPLES
/
SIMPLE
/
except.mod
< prev
next >
Wrap
Text File
|
1994-07-22
|
512b
|
26 lines
MODULE except;
IMPORT M2EXCEPTION, WholeConv, STextIO, SWholeIO;
CONST
ws = STextIO.WriteString;
wl = STextIO.WriteLn;
wi = SWholeIO.WriteInt;
PROCEDURE Div(a,b: INTEGER): INTEGER;
BEGIN
RETURN a DIV b
EXCEPT
IF M2EXCEPTION.IsM2Exception() THEN
IF M2EXCEPTION.M2Exception() = M2EXCEPTION.wholeDivException THEN
ws("*** whole div exception ***"); wl;
RETURN MAX(INTEGER)
END;
END;
END Div;
BEGIN
wi(Div(1,1),0); wl;
wi(Div(1,0),0); wl;
END except.