[scilab-Users] Fw: SCILAB hangs when used in try-catch
Bruno JOFRET
bruno.jofret at scilab.org
Mon Apr 19 17:22:55 CEST 2010
hi,
You have an error in that line
if (x < 2) then t = x +"sr";
You try to make an addition between a double and a string.
This is not allowed in scilab so it will try to call an overload method.
try this :
if (x < 2) then t = string(x) +"sr";
And this should no more have any failure.
Regards,
Julio Gonzalez-Saenz wrote:
>
> Hi SCILAB community,
>
> !Scilab Version: !5.2.0.1266391513
> ! !
> !Operating System: !Windows 7 6.1
> ! !
> !Java version : !1.6.0_18
> ! !
> !Java runtime information : !Java(TM) SE Runtime Environment (build
> 1.6.0_18-b07)
> ! !
> !Java vm information : !Java HotSpot(TM) Client VM (build
> 16.0-b13, mixed mode)
> ! !
> !Vendor specification: !Sun Microsystems Inc.
>
>
> I have a problem running a try-catch-end block when a while loop in
> inside it.
>
> 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..
>
> x=5;
> try
> while (x>=0)
> x=x-1
> disp("x sollte positiv sein")
> if (x < 2) then t = x +"sr";
> else z=testmatrix("magic",x)
> end
> end
> catch
> x
> disp('catch: Ein Fehler ist aufgetreten');
> z=testmatrix("magic",10)
> end
>
> I can not find the reason of this failure in the mailing list... maybe
> someone know something about it??
>
> Regards,
>
> Julio Gonzalez-Saenz
> www.part-time-scientist.com
> www.neex-technologies.com
>
>
--
Bruno JOFRET
Software Architect
The Scilab Consortium
Digiteo Foundation
Domaine de Voluceau
Rocquencourt - B.P. 105
78153 Le Chesnay France
Phone: +33.1.39.63.58.63
More information about the users
mailing list