NAME
Tcl_GetVar - return the value of a Tcl variable

SYNOPSIS
#include <tcl.h>

char *
Tcl_GetVar(interp, varName, global)

ARGUMENTS
Interpreter in which to check for variable. Name of desired variable. If non-zero, then insist that varName be interpreted as a global variable regardless of whether a procedure invocation is in progress.

DESCRIPTION

Tcl_GetVar is a utility procedure used by several of the Tcl commands. It returns the value of variable varName in interpreter interp. If there isn't a Tcl command procedure being interpreted right now, or if global is non-zero, then varName is always treated as the name of a global variable. Otherwise, if a procedure is being interpreted, then varName will be treated as a local variable name, unless it has been declared global using the global command. If no variable by the name varName exists right now, then a NULL pointer is returned.

KEYWORDS
interpreter, global, local, variable