Name

set — Set a variable.

Synopsis

set varname [value]

Description

The set sets the value of a variable varname to value value. If value is not provided, returns the value of varname.

Example

set foo "bar"
set bee bop
puts "foo is $foo and bee is $bee"
	  

Produces:

1
foo is bar and bee is bop