[scilab-Users] variables from TCL in Scilab

François Vogel fvogelnew1 at free.fr
Tue Mar 23 16:07:41 CET 2010


marcin.wozniczka Gazeta.pl said on 23/03/2010 15:51:
> I have only *ans = T*
> When I put name of scliab variable in Scilab Console after I ran this
> proces I have only information
> *xa*
> *  !--error 4 *
> *Undefined variable: xa*

This comment make me think you are expecting the Scilab console to 
know about xa when running your function liczSL. You should probably 
read about variables scoping here:
http://wiki.scilab.org/howto/global_and_local_variables

Anyway your description is unclear and not complete.
After running the code with Tcl instructions in it I get a GUI. What 
am I supposed to fill in the blanks and what am I supposed to do with 
the GUI menues to reproduce your error?


> /function []=liczSL()/
> /  global('wlxa','wlya','wlxb','wlyb','wla','wlb')/

This global is not needed (and potentially harmful).


> /'proc calcSL {} {'/
> /'ScilabEval liczSL()' /
> /'}'];/

This is not returning any result. How do you expect this to fill in 
your blanks "Punkt wcinany" (I don't speak your language) ?

Try to add the required Tcl_SetVar in function liczSL

Francois




More information about the users mailing list