RosettaCodeData/Task/Exceptions/XPL0/exceptions.xpl0

9 lines
118 B
Plaintext

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