set(7,n,1 builtins)(n) Tcl Built-In Commands set(7,n,1 builtins)(n) NAME set(7,n,1 builtins) - Read and write(1,2) variables SYNOPSIS set(7,n,1 builtins) varName ?value? DESCRIPTION Returns the value of variable varName. If value is specified, then set(7,n,1 builtins) the value of varName to value, creating a new variable if(3,n) one doesn't already exist, and return its value. If varName contains an open(2,3,n) parenthesis and ends with a close(2,7,n) parenthesis, then it refers to an array element: the characters before the first open(2,3,n) parenthesis are the name of the array, and the characters between the parentheses are the index within the array. Otherwise varName refers to a scalar vari- able. Normally, varName is unqualified (does not include the names of any containing namespaces), and the variable of that name in(1,8) the cur- rent namespace is read(2,n,1 builtins) or written. If varName includes namespace qual- ifiers (in(1,8) the array name if(3,n) it refers to an array element), the vari- able in(1,8) the specified namespace is read(2,n,1 builtins) or written. If no procedure is active, then varName refers to a namespace variable (global variable if(3,n) the current namespace is the global namespace). If a procedure is active, then varName refers to a parameter or local variable of the procedure unless the global command was invoked to declare varName to be global, or unless a variable command was invoked to declare varName to be a namespace variable. SEE ALSO expr(1,3,n)(n), proc(5,n)(n), trace(3x,n,3x _nc_tracebits)(n), unset(n) KEYWORDS read(2,n,1 builtins), write(1,2), variable Tcl set(7,n,1 builtins)(n)