summaryrefslogtreecommitdiffstats
path: root/doc/array.n
diff options
context:
space:
mode:
authorbll <brad.lanam.comp@gmail.com>2018-03-06 18:21:34 (GMT)
committerbll <brad.lanam.comp@gmail.com>2018-03-06 18:21:34 (GMT)
commitd2d193de11dddfa68c52223bfee22fc1c7e9de3c (patch)
tree65f8b811bb493076edcf3d03bf6a2fe1e6c3218a /doc/array.n
parent77d58c599368d5ecbe0803d79023efe7cd2f24bc (diff)
downloadtcl-d2d193de11dddfa68c52223bfee22fc1c7e9de3c.zip
tcl-d2d193de11dddfa68c52223bfee22fc1c7e9de3c.tar.gz
tcl-d2d193de11dddfa68c52223bfee22fc1c7e9de3c.tar.bz2
array for: updated documentation: value variable is not optional, add
specifics about when array for terminates.
Diffstat (limited to 'doc/array.n')
-rw-r--r--doc/array.n6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/array.n b/doc/array.n
index 751c688..d6d4dff 100644
--- a/doc/array.n
+++ b/doc/array.n
@@ -47,12 +47,14 @@ been the return value from a previous invocation of
Returns 1 if \fIarrayName\fR is an array variable, 0 if there
is no variable by that name or if it is a scalar variable.
.TP
-\fBarray for {\fIkeyVariable ?valueVariable?\fB} \fIarrayName body\fR
-The first argument is a one or two element list of variable names for the
+\fBarray for {\fIkeyVariable valueVariable\fB} \fIarrayName body\fP
+The first argument is a two element list of variable names for the
key and value of each entry in the array. The second argument is the
array name to iterate over. The third argument is the body to execute
for each key and value returned.
The ordering of the returned keys is undefined.
+If an array element is deleted or a new array element is inserted during
+the \fIarray for\fP process, the command will terminate with an error.
.TP
\fBarray get \fIarrayName\fR ?\fIpattern\fR?
Returns a list containing pairs of elements. The first