Query: incr
OS: opensolaris
Section: 1t
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
incr(1T) Tcl Built-In Commands incr(1T) __________________________________________________________________________________________________________________________________________________NAMEincr - Increment the value of a variableSYNOPSISincr varName ?increment? _________________________________________________________________DESCRIPTIONIncrements 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.EXAMPLESAdd 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 numeric and generating an error if it is not): incr x 0SEE ALSOexpr(1T)KEYWORDSadd, increment, variable, valueATTRIBUTESSee attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWTcl | +--------------------+-----------------+ |Interface Stability | Uncommitted | +--------------------+-----------------+NOTESSource for Tcl is available on http://opensolaris.org. Tcl incr(1T)
Related Man Pages |
---|
incr(1t) - opensolaris |
lappend(1t) - opensolaris |
set(n) - redhat |
set(1) - opendarwin |
set(16) - opendarwin |
Similar Topics in the Unix Linux Community |
---|
Two Proposed Forum Add-on Features |
Increment a variable in unix bash |
Bash variable within variable |
Storing file contents to a variable |
Replace integer string in a variable based on month? |