September 2009
Intermediate to advanced
816 pages
19h 38m
English
In this chapter we cover how to set Tcl variables from C, how to read their values, and how to delete them. We also describe how to link C variables and Tcl variables, so that when one changes, the other changes as well. Also included is a description of variable traces.
This chapter covers the following functions for manipulating Tcl variables from C code:
• Tcl_Obj *Tcl_SetVar2Ex(Tcl_Interp *interp, CONST char *name1, CONST char *name2, Tcl_Obj *newValuePtr, int flags)
Sets the variable given by name1 (and name2 in the case of an array element) to newValuePtr.
• CONST char *Tcl_SetVar(Tcl_Interp *interp, CONST char *varName, CONST ...
Read now
Unlock full access