ScilabEvaltcl instruction : Evaluate a string
with scilab interpreter
Calling SequenceScilabEval instruction
ScilabEval instruction "seq"
ScilabEval instruction "sync"
ScilabEval instruction "sync" "seq"
ScilabEval "flush"
Argumentsinstructiontcl string character contains a Scilab instruction to evaluate
with the current Scilab interpreter.
DescriptionThis function must be called in a tcl/tk script executed from Scilab.
It allows to associate Scilab actions to tcl/tk widgets (graphic objects)
or to use Scilab to perform some computations within a tcl script.
ScilabEval instruction
If the ScilabEval instruction syntax is used, the
instruction is first stored in a FIFO queue,
ScilabEval returns immediately. Scilab executes the
queued instructions when possible (it should be at the
prompt but also at the end of each instructions of the currently
running function) in the order they were submitted. This syntax can be
used to associate Scilab actions to tcl/tk widgets but not into a tcl
script executed by TCL_EvalFile or TCL_EvalStr
because in this situation the Scilab interpreter is blocked up to the
end of the script. Note that with the
ScilabEval instruction syntax, if there are many
ScilabEval
commands stored in the queue the execution of the second one can be
started in the middle of the execution of the first one (in particular
if the first one contains more than a simple expression).
If the "seq" option is added, the associated
instruction evaluation should be finished (or paused) before the next
queued instruction evaluation can be started. The next callback stored
in the command queue will only be taken into account when the current
one will be finished or paused.
ScilabEval instruction "sync"
If the ScilabEval instruction "sync" syntax is used,
the instruction is executed immediately (not queued) and the
ScilabEvalreturns when the instruction
evaluation is finished. The scilab instruction
evaluation may be interrupted by new or queued commands.
If the "seq" option is added, the associated
instruction evaluation should be finished (or paused) before any
queued instruction evaluation can be started. The scilab
instruction evaluation may not be interrupted by new or
queued commands (except if it is paused).
ScilabEval "flush"
If the ScilabEval "flush" syntax is used, all the
previously queued instructions are executed immediately
and the ScilabEval returns when the execution is finished. Each
instruction is executed with the option used at the time
of queuing up (i.e. seq or no option).
The evaluation context of all these cases is the current Scilab context
when theinstruction evaluation starts.
More information about Tcl/Tk: http://www.tcl.tk/doc/ExamplesSee Also
TCL_EvalFile
TCL_EvalStr
TCL_GetVar
TCL_SetVar