From 03f7f3bd52bb79d562c7a70e375844d9d94979b1 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 4 Nov 2010 13:51:41 +0000 Subject: * doc/Tcl.n (Variable substitution): [Bug 3099086]: Increase clarity of explanation of what characters are actually permitted in variable substitutions. Note that this does not constitute a change of behavior; it is just an improvement of explanation. --- ChangeLog | 7 +++++++ doc/Tcl.n | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1e097ab..9790e3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-11-04 Donal K. Fellows + + * doc/Tcl.n (Variable substitution): [Bug 3099086]: Increase clarity + of explanation of what characters are actually permitted in variable + substitutions. Note that this does not constitute a change of + behavior; it is just an improvement of explanation. + 2010-11-04 Don Porter * changes: Updates for 8.6b2 release. (Thanks Andreas Kupries) diff --git a/doc/Tcl.n b/doc/Tcl.n index fd31dfc..eaa221d 100644 --- a/doc/Tcl.n +++ b/doc/Tcl.n @@ -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: Tcl.n,v 1.24 2010/01/13 12:08:30 dkf Exp $ +'\" RCS: @(#) $Id: Tcl.n,v 1.25 2010/11/04 13:51:41 dkf Exp $ '\" .so man.macros .TH Tcl n "8.5" Tcl "Tcl Built-In Commands" @@ -110,6 +110,8 @@ Variable substitution may take any of the following forms: \fIName\fR is the name of a scalar variable; the name is a sequence of one or more characters that are a letter, digit, underscore, or namespace separators (two or more colons). +Letters and digits are \fIonly\fR the standard ASCII ones (\fB0\fR\-\fB9\fR, +\fBA\fR\-\fBZ\fR and \fBa\fR\-\fBz\fR). .TP 15 \fB$\fIname\fB(\fIindex\fB)\fR . @@ -117,6 +119,8 @@ or namespace separators (two or more colons). the name of an element within that array. \fIName\fR must contain only letters, digits, underscores, and namespace separators, and may be an empty string. +Letters and digits are \fIonly\fR the standard ASCII ones (\fB0\fR\-\fB9\fR, +\fBA\fR\-\fBZ\fR and \fBa\fR\-\fBz\fR). Command substitutions, variable substitutions, and backslash substitutions are performed on the characters of \fIindex\fR. .TP 15 @@ -136,6 +140,10 @@ substitutions are performed during the parsing of \fIname\fR. .PP There may be any number of variable substitutions in a single word. Variable substitution is not performed on words enclosed in braces. +.PP +Note that variables may contain character sequences other than those listed +above, but in that case other mechanisms must be used to access them (e.g., +via the \fBset\fR command's single-argument form). .RE .IP "[9] \fBBackslash substitution.\fR" If a backslash -- cgit v0.12