tclgetvar
Retrieve the value of a Tcl variable as a string.
Syntax
tclgetvar(varname, index)
Argument
- varname
- A string.
- index
- A string (optional).
Example
Templex Expression | Results |
---|---|
{ mypath = tclgetvar("env", "PATH")
}
|
"/usr/local/bin " |
Comments
This function can be used to retrieve information from Tcl routines, which can be invoked via tcleval or tclevalfile. The second parameter is optional and is used as an array index into varname.