This manual page is for Mac OS X version 10.6.3

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • For more information about the manual page format, see the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Reference Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.



incr(n)                                     Tcl Built-In Commands                                    incr(n)



____________________________________________________________________________________________________________

NAME
       incr - Increment the value of a variable

SYNOPSIS
       incr varName ?increment?
____________________________________________________________________________________________________________


DESCRIPTION
       Increments the value stored in the variable whose name is varName.  The value of the variable must be
       an integer.  If increment is supplied then its value (which must be an integer) is added to the value
       of  variable  varName;  otherwise 1 is added to varName.  The new value is stored as a decimal string
       in variable varName and also returned as result.

       Starting with the Tcl 8.5 release, the variable varName passed to incr may  be  unset,  and  in  that |
       case, it will be set to the value increment or to the default increment value of 1.

EXAMPLES
       Add one to the contents of the variable x:
              incr x

       Add 42 to the contents of the variable x:
              incr x 42

       Add the contents of the variable y to the contents of the variable x:
              incr x $y

       Add nothing at all to the variable x (often useful for checking whether an argument to a procedure is
       actually integral and generating an error if it is not):
              incr x 0


SEE ALSO
       expr(n)


KEYWORDS
       add, increment, variable, value



Tcl                                                                                                  incr(n)

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation to the Tcl project.
Bug reports
Report bugs in the functionality of the described tool or API to Apple through Bug Reporter and to the Tcl project through their bug reporting page.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.

Did this document help you? Yes It's good, but... Not helpful...