NAME
Tcl_SetVar - change the value of a Tcl variable

SYNOPSIS
#include <tcl.h>

Tcl_SetVar(interp, varName, newValue, global)

ARGUMENTS
Interpreter in which to change variable. Name of variable. New value for varName If non-zero, then insist on interpreting varName as a global variable, regardless of whether a procedure invocation is in progress.

DESCRIPTION

This is a utility procedure used by many of the Tcl commands. It changes the value of variable varName in interpreter interp, such that future calls to Tcl_GetVar will return newValue as the value of varName. Tcl_SetVar uses the same rules for selecting a global or local variable as Tcl_GetVar. If varName doesn't already exist, then a new variable is created. Tcl_SetVar copies both varName and newValue into its own private storage, so the caller may change the contents of these strings after Tcl_SetVar returns without affecting the variable's value.

KEYWORDS
interpreter, variable