incr — Increment a variable.
incr varreference integer
incr
varreference
integer
The incr command takes a variable reference, and adds integer to it.
integer to it
set foo 1 incr $foo puts "foo is $foo" incr $foo 10 puts "foo is now $foo"
Produces:
2 12