User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

tcl_command [2007/02/20 03:54]
tcl_command [2007/02/20 03:54] (current)
Line 1: Line 1:
 +#$EPIC: tcl_command.txt,​v 1.2 2007/02/20 03:54:29 jnelson Exp $
 +[[tcl_command|tcl]] {//tcl statement//​}
 +If the client was linked with an embedded tcl interpreter,​ the //tcl statement//
 +shall be executed by tcl.  If the client was not linked against tcl, then no
 +action shall take place.
 +Although every //tcl statement// resolves to a (tcl) value, that
 +value is discarded when you run it this way.
 +If the //tcl statement// has an error, the result is undefined, but usually
 +an error message is output to the window.
 +Remember that the insides of {}s are protected from ircII expansion, so if
 +you want to pass ircII values into your tcl script, you do best to export
 +the value to tcl using $[[tcl function]]() first. ​ The insides of the {}
 +should be a literal segment of tcl code.
 +You can call back to EPIC from tcl with these commands:
 +|[epic cmd string] ​ | Run //string// as a [[block]] without $ expansion. |
 +|[epic eval string] | Run //string// as a [[block]] with $ expansion. ​ The value of $* is the empty string |
 +|[epic expr string] | Evalulate //string// as an expression, and return the result. |
 +|[epic call string] | Call //string// where //string// looks like "​func(args)",​ returning the result. ​ The value of $* is the empty string. |
 +|[echo ...]         | Output something through the client. |
 +|[tkon] ​            | Turn on the Tk system. ​ You must call this before calling any Tk commands. ​ |
 +Someone want to give me some examples?
 +The [[tcl command]] first appeared in EPIC4-1.1.8
tcl_command.txt ยท Last modified: 2007/02/20 03:54 (external edit)