summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2020-08-22 14:24:31 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2020-08-22 14:24:31 (GMT)
commitc76cad8a920e86cd3c255ed42e6f5b2bb727df1c (patch)
tree27dd463887dde4b6795c8106d478898f57f07d18
parent42a34d459e99c9e366e626e134d3e75e74e1f191 (diff)
downloadtcl-c76cad8a920e86cd3c255ed42e6f5b2bb727df1c.zip
tcl-c76cad8a920e86cd3c255ed42e6f5b2bb727df1c.tar.gz
tcl-c76cad8a920e86cd3c255ed42e6f5b2bb727df1c.tar.bz2
Added documentation
-rw-r--r--doc/expr.n8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/expr.n b/doc/expr.n
index 1498ba1..25b0a84 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