RosettaCodeData/Task/Exceptions/XPL0/exceptions.xpl0
2023-07-01 13:44:08 -04:00

8 lines
118 B
Text

real A;
[Trap(false);
A:= Sqrt(-42.);
if GetErr then
Text(0, "Square root of a negative value.
");
RlOut(0, A);
]