Jump to content

Detect division by zero: Difference between revisions

m
→‎{{header|Phix}}: added syntax colouring the hard way, phix/basics
(Add Neko)
m (→‎{{header|Phix}}: added syntax colouring the hard way, phix/basics)
Line 1,639:
 
=={{header|Phix}}==
{{libheader|Phix/basics}}
<!--<lang Phix>try-->
integer i = 1/0
<span style="color: #008080;">try</span>
catch e
<span style="color: #004080;">integer</span> <span style="color: #000000;">i</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">1<span style="color: #0000FF;">/<span style="color: #000000;">0</span>
?e[E_USER]
<span style="color: #008080;">catch</span> <span style="color: #000000;">e</span>
end try
<span style="color: #0000FF;">?<span style="color: #000000;">e<span style="color: #0000FF;">[<span style="color: #000000;">E_USER<span style="color: #0000FF;">]</span>
puts(1,"still running...\n")</lang>
<span style="color: #008080;">end</span> <span style="color: #008080;">try</span>
<span style="color: #7060A8;">puts<span style="color: #0000FF;">(<span style="color: #000000;">1<span style="color: #0000FF;">,<span style="color: #008000;">"still running...\n"<span style="color: #0000FF;">)
<!--</lang>-->
{{out}}
<pre>
7,813

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.