RosettaCodeData/Task/Detect-division-by-zero/XPL0/detect-division-by-zero.xpl0

7 lines
188 B
Text
Raw Permalink Normal View History

2013-04-10 22:43:41 -07:00
include c:\cxpl\codes;
int A, B;
[Trap(false); \turn off error trapping
B:= 1234/(A-A); \(error not detected at compile time)
if GetErr then Text(0, "Divide by zero");
]