[Scilab-users] strange behavior of function xstring

Станислав krotersv at gmail.com
Fri Mar 15 11:22:07 CET 2013


15.03.2013 16:18, grivet пишет:
> Hello,
> I have noticed the following strange behavior of function xstring.
>
> This piece of code works fine:
>
>         clear; clf();
>         s = "A";
>         plot2d(0,0,-1,"010"," ",[-2,-2,2,2]);
>         xstring(0.5,0.5,s);
>
> This one does not (simplified exemple, no useful purpose):
>
>         clear; clf();
>         function etiq(x,y)
>             s = "A";
>             xstring(x,y,s};
>         endfunction
>         plot2d(0,0,-1,"010"," ",[-2,-2,2,2]);
>         etiq(0.5,0.5);
>
> Scilab stops with error message
>
>         xstring(x,y,s};
>                !--error 2
>         Facteur invalide.
>         at line       3 of function etiq called by :
>
> What do I do wrong?
> JP Grivet
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
Hi.
Pay attention to brace!
xstring(x,y,s}

Stanislav



More information about the users mailing list