X := 0; Ln(X) seems to generated an exception without need to adjust exception mask. The reason I ask is that I get a strange crash while doing my charting program, I just suspected the reason being an exception is slipped through without being caught.<br>
<br>As this happened outside of IDE, I don't know the exact reason. I will do a screenshot and ask again.<br><br>Thanks. <br><br><div class="gmail_quote">2013/3/5 Sven Barth <span dir="ltr"><<a href="mailto:pascaldragon@googlemail.com" target="_blank">pascaldragon@googlemail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am 04.03.2013 16:05, schrieb Xiangrong Fang:<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
As title. My question is not just "it is a language construct", but "WHY". What's the benefit of doing so?<br>
</blockquote></div>
I already wrote this in the other thread: if you write "ln(0)" then the compiler will hardcode this as "NaN". I don't know what will happen with "ln(x)" with "x := 0" though. Maybe you'll need to set the exception mask correctly (see here: <a href="http://www.freepascal.org/docs-html/rtl/math/setexceptionmask.html" target="_blank">http://www.freepascal.org/<u></u>docs-html/rtl/math/<u></u>setexceptionmask.html</a> ) to get an exception.<br>
<br>
Regards,<br>
Sven<div class="HOEnZb"><div class="h5"><br>
<br>
--<br>
______________________________<u></u>_________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org" target="_blank">Lazarus@lists.lazarus.<u></u>freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.<u></u>freepascal.org/mailman/<u></u>listinfo/lazarus</a><br>
</div></div></blockquote></div><br>