summaryrefslogtreecommitdiffstats
path: root/doc/incr.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/incr.n')
-rw-r--r--doc/incr.n12
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/incr.n b/doc/incr.n
index 46c80a1..9052c5a 100644
--- a/doc/incr.n
+++ b/doc/incr.n
@@ -14,7 +14,6 @@ incr \- Increment the value of a variable
.SH SYNOPSIS
\fBincr \fIvarName \fR?\fIincrement\fR?
.BE
-
.SH DESCRIPTION
.PP
Increments the value stored in the variable whose name is \fIvarName\fR.
@@ -25,24 +24,26 @@ integer) is added to the value of variable \fIvarName\fR; otherwise
The new value is stored as a decimal string in variable \fIvarName\fR
and also returned as result.
.PP
-.VS 8.5
Starting with the Tcl 8.5 release, the variable \fIvarName\fR passed
to \fBincr\fR may be unset, and in that case, it will be set to
the value \fIincrement\fR or to the default increment value of \fB1\fR.
-.VE 8.5
.SH EXAMPLES
+.PP
Add one to the contents of the variable \fIx\fR:
+.PP
.CS
\fBincr\fR x
.CE
.PP
Add 42 to the contents of the variable \fIx\fR:
+.PP
.CS
\fBincr\fR x 42
.CE
.PP
Add the contents of the variable \fIy\fR to the contents of the
variable \fIx\fR:
+.PP
.CS
\fBincr\fR x $y
.CE
@@ -50,12 +51,11 @@ variable \fIx\fR:
Add nothing at all to the variable \fIx\fR (often useful for checking
whether an argument to a procedure is actually integral and generating
an error if it is not):
+.PP
.CS
\fBincr\fR x 0
.CE
-
.SH "SEE ALSO"
-expr(n)
-
+expr(n), set(n)
.SH KEYWORDS
add, increment, variable, value