summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-11-11 16:32:51 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-11-11 16:32:51 (GMT)
commit1eab2734fe5d7bf125a657ef949e2d25797270e8 (patch)
treea6bd62cbe56a2880a4e9b05f4cf36fc7d58d8d1e /doc
parentba934aa27e1d1b8a6b0110817028080ea4c6694d (diff)
parentfe1abc551a8ea4caf53fa1755995e935e61e2b93 (diff)
downloadtcl-1eab2734fe5d7bf125a657ef949e2d25797270e8.zip
tcl-1eab2734fe5d7bf125a657ef949e2d25797270e8.tar.gz
tcl-1eab2734fe5d7bf125a657ef949e2d25797270e8.tar.bz2
Merge 8.7
Diffstat (limited to 'doc')
-rw-r--r--doc/expr.n8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/expr.n b/doc/expr.n
index 69f6399..2c2742c 100644
--- a/doc/expr.n
+++ b/doc/expr.n
@@ -41,6 +41,12 @@ When an expression evaluates to an integer, the value is the decimal form of
the integer, and when an expression evaluates to a floating-point number, the
value is the form produced by the \fB%g\fR format specifier of Tcl's
\fBformat\fR command.
+.PP
+.VS "TIP 582"
+You can use \fB#\fR at any point in the expression (except inside double
+quotes or braces) to start a comment. Comments last to the end of the line or
+the end of the expression, whichever comes first.
+.VE "TIP 582"
.SS OPERANDS
.PP
An expression consists of a combination of operands, operators, parentheses and
@@ -487,7 +493,9 @@ value of true:
.PP
.CS
set isTrue [\fBexpr\fR {
+ # Does the environment variable exist, and...
[info exists ::env(SOME_ENV_VAR)] &&
+ # ...does it contain a proper true value?
[string is true -strict $::env(SOME_ENV_VAR)]
}]
.CE