diff options
author | dkf <dkf@noemail.net> | 2004-10-27 12:52:31 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2004-10-27 12:52:31 (GMT) |
commit | 46669897decc1c69eb2226d713c9ddaa026431ec (patch) | |
tree | 3ed6ba33b7a0eb1bb7d89c83f86bb2f420d5284a /doc/incr.n | |
parent | 739cb7dee1505acf27c9efe8995d76ecbf76a098 (diff) | |
download | tcl-46669897decc1c69eb2226d713c9ddaa026431ec.zip tcl-46669897decc1c69eb2226d713c9ddaa026431ec.tar.gz tcl-46669897decc1c69eb2226d713c9ddaa026431ec.tar.bz2 |
More doc fix backporting
FossilOrigin-Name: 63610c2fd0b97f8b6c13c39e453c7b7fcc8decc2
Diffstat (limited to 'doc/incr.n')
-rw-r--r-- | doc/incr.n | 25 |
1 files changed, 24 insertions, 1 deletions
@@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: incr.n,v 1.3 2000/09/07 14:27:48 poenitz Exp $ +'\" RCS: @(#) $Id: incr.n,v 1.3.18.1 2004/10/27 12:52:40 dkf Exp $ '\" .so man.macros .TH incr n "" Tcl "Tcl Built-In Commands" @@ -26,6 +26,29 @@ integer) is added to the value of variable \fIvarName\fR; otherwise 1 is added to \fIvarName\fR. The new value is stored as a decimal string in variable \fIvarName\fR and also returned as result. +.SH EXAMPLES +Add one to the contents of the variable \fIx\fR: +.CS +\fBincr\fR x +.CE +.PP +Add 42 to the contents of the variable \fIx\fR: +.CS +\fBincr\fR x 42 +.CE +.PP +Add the contents of the variable \fIy\fR to the contents of the +variable \fIx\fR: +.CS +\fBincr\fR x $y +.CE +.PP +Add nothing at all to the variable \fIx\fR (often useful for checking +whether an argument to a procedure is actually numeric and generating +an error if it is not): +.CS +\fBincr\fR x 0 +.CE .SH "SEE ALSO" expr(n) |