From c76cad8a920e86cd3c255ed42e6f5b2bb727df1c Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 22 Aug 2020 14:24:31 +0000 Subject: Added documentation --- doc/expr.n | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- cgit v0.12