RosettaCodeData/Task/Detect-division-by-zero/XPL0/detect-division-by-zero.xpl0
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

6 lines
188 B
Text

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");
]