<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'><div><font face="times new roman, new york, times, serif"><span style="font-size: 12pt;">thanks for the advice</span></font></div><div><font face="times new roman, new york, times, serif"><span style="font-size: 12pt;"><br></span></font></div><font face="times new roman, new york, times, serif"><span style="font-size: 12pt;">well I tried but it does not work as expected ; errcatch seems to be obsolete so I'm testing it with execstr: the warning is not displayed ... why ????</span></font><div style="color: rgb(0, 0, 0); font-family: "times new roman", "new york", times, serif; font-size: 12pt;"><br></div><div style="color: rgb(0, 0, 0); font-family: "times new roman", "new york", times, serif; font-size: 12pt;">###########################################</div><div><div><font face="times new roman, new york, times, serif">mode(0)</font></div><div><font face="times new roman, new york, times, serif"><br></font></div><div><font face="times new roman, new york, times, serif">try</font></div><div><font face="times new roman, new york, times, serif"> x = 0;</font></div><div><font face="times new roman, new york, times, serif"> y = (1/x)</font></div><div><font face="times new roman, new york, times, serif"><br></font></div><div><font face="times new roman, new york, times, serif"> if execstr(('y','errcatch') <> 0) then</font></div><div><font face="times new roman, new york, times, serif"> printf("you''re a fool\n");</font></div><div><font face="times new roman, new york, times, serif"> else</font></div><div><font face="times new roman, new york, times, serif"> printf("Everything is going well\n");</font></div><div><font face="times new roman, new york, times, serif"> end</font></div><div><font face="times new roman, new york, times, serif"> errclear;</font></div><div><font face="times new roman, new york, times, serif">end</font></div><br><hr id="zwchr" style="color: rgb(0, 0, 0); font-family: "times new roman", "new york", times, serif; font-size: 12pt;"><div style="color: rgb(0, 0, 0); font-family: Helvetica, Arial, sans-serif; font-size: 12pt; font-weight: normal; font-style: normal; text-decoration: none;"><b>De: </b>"Jens Simon Strom" <j.s.strom@hslmg.de><br><b>À: </b>"Users mailing list for Scilab" <users@lists.scilab.org><br><b>Envoyé: </b>Jeudi 6 Octobre 2016 11:48:50<br><b>Objet: </b>Re: [Scilab-users] Scilab control after an impossible calculation<br><br>
Try<span class="functionid"> errcatch</span><span class="default">().</span>
<div class="refsynopsisdiv">
<div class="synopsis"> </div>
----------------------------------------------------------------------------</div>
<br>
<div class="moz-cite-prefix">Am 06.10.2016 10:51, schrieb
<a class="moz-txt-link-abbreviated" href="mailto:paul.carrico@free.fr" target="_blank">paul.carrico@free.fr</a>:<br>
</div>
<blockquote cite="mid:1695201020.364037264.1475743899649.JavaMail.root@zimbra5-e1.priv.proxad.net">
<style>p { margin: 0; }</style>
<div style="font-family: times new roman,new york,times,serif;
font-size: 12pt; color: #000000">
<p class="MsoNormal">Hi All</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span lang="EN-US">I’m using
Scilab as the interface between my optimizer and my finite
element solver(s)
and sometimes Scilab stops because of unexpected and
impossible calculus (1/x
with x = 0 as an example ); obviously Scilab stops (and so
the optimization).</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">I’m
wondering if it’s possible:</span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><span lang="EN-US">-<span style="font-variant-numeric: normal;
font-stretch: normal; font-size: 7pt; line-height: normal;
font-family: "Times New Roman";">
</span></span><span lang="EN-US">To
ask back Scilab a message such as “hey I crashed because
you’re a fool and
you’ve not anticipated an impossible calculation !!!”</span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><span lang="EN-US">-<span style="font-variant-numeric: normal;
font-stretch: normal; font-size: 7pt; line-height: normal;
font-family: "Times New Roman";">
</span></span><span lang="EN-US">To
get back Scilab control in order to avoid optimization
process crash ? I’ve
been thinking in affecting a cost function value at %inf for
example (not
elegant I recognize)</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">I don’t
know if I’m understandable enough …</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">Paul</span></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org" target="_blank">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users" target="_blank">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<br>_______________________________________________<br>users mailing list<br>users@lists.scilab.org<br>http://lists.scilab.org/mailman/listinfo/users<br></div><br></div></div></body></html>