Name

incr — Increment a variable.

Synopsis

incr varreference integer

Description

The incr command takes a variable reference, and adds integer to it.

Example

set foo 1
incr $foo
puts "foo is $foo"
incr $foo 10
puts "foo is now $foo"
	  

Produces:

2
12