<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">Hi Bruno,<br><br>Yes.. I know, this is exactly I wanted to do.. to check the correct behavior in my try-catch method..<br><br> I need an error so that try block is not executed but catch-block. And this type of error is the easiest one.. <br><br>Regards,<br><br>Julio<br><div><br></div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Bruno JOFRET <bruno.jofret@scilab.org><br><b><span style="font-weight: bold;">To:</span></b> users@lists.scilab.org<br><b><span style="font-weight: bold;">Sent:</span></b> Mon, 19 April, 2010 17:22:55<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [scilab-Users]
 Fw: SCILAB hangs when used in try-catch<br></font><br>hi,<br><br>You have an error in that line<br>if (x < 2) then t = x +"sr";<br><br>You try to make an addition between a double and a string.<br>This is not allowed in scilab so it will try to call an overload method.<br><br>try this :<br>if (x < 2) then t = string(x) +"sr";<br><br>And this should no more have any failure.<br><br>Regards,<br><br>Julio Gonzalez-Saenz wrote:<br>> <br>> Hi SCILAB community,<br>> <br>> !Scilab Version:             !5.2.0.1266391513 !                            !<br>> !Operating System:           !Windows 7 6.1 !                            !<br>> !Java version :              !1.6.0_18 !         
                   !<br>> !Java runtime information :  !Java(TM) SE Runtime Environment (build 1.6.0_18-b07)<br>> !                            !<br>> !Java vm information :       !Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode)<br>> !                            !<br>> !Vendor specification:       !Sun Microsystems Inc.<br>>  <br>> I have a problem running a try-catch-end block when a while loop in inside it.<br>> <br>> For example, the following code just create magic matrices from 4 to 1 but at x=2, an error supposed to happen.  The error is correctly detected, but I have to restart scilab because it does not respond..<br>> <br>> x=5;<br>> try<br>>    while
 (x>=0)<br>>         x=x-1<br>>         disp("x sollte positiv sein")<br>>         if (x < 2) then t = x +"sr";<br>>         else z=testmatrix("magic",x)<br>>         end<br>>    end<br>> catch<br>>    x<br>>     disp('catch: Ein Fehler ist aufgetreten');<br>>     z=testmatrix("magic",10)<br>> end<br>> <br>> I can not find the reason of this failure in the mailing list... maybe someone know something about it??<br>> <br>> Regards,<br>> <br>> Julio Gonzalez-Saenz<br>> www.part-time-scientist.com<br>> www.neex-technologies.com<br>> <br>> <br><br><br>-- Bruno JOFRET<br>Software Architect<br><br>The Scilab Consortium<br>Digiteo Foundation<br>Domaine de Voluceau<br>Rocquencourt - B.P. 105<br>78153 Le Chesnay France<br>Phone:
 +33.1.39.63.58.63<br></div></div>
</div><br>



      </body></html>