summaryrefslogtreecommitdiffstats
path: root/doc/expr.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-12-08 20:25:40 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-12-08 20:25:40 (GMT)
commitc63800fafacdbb36b826ca84d62559fda1c77485 (patch)
treedf9ed9b441e976abbde0a24e90ff16212e536ed1 /doc/expr.n
parent663ddf0e85629ebc17b2b0a161119f97df0f9e97 (diff)
downloadtcl-c63800fafacdbb36b826ca84d62559fda1c77485.zip
tcl-c63800fafacdbb36b826ca84d62559fda1c77485.tar.gz
tcl-c63800fafacdbb36b826ca84d62559fda1c77485.tar.bz2
Improved the documentation of the operators. [Bug 1823622]
Diffstat (limited to 'doc/expr.n')
-rw-r--r--doc/expr.n14
1 files changed, 10 insertions, 4 deletions
diff --git a/doc/expr.n b/doc/expr.n
index 928d31b..8af04ce 100644
--- a/doc/expr.n
+++ b/doc/expr.n
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: expr.n,v 1.32 2007/10/30 21:38:06 dkf Exp $
+'\" RCS: @(#) $Id: expr.n,v 1.33 2007/12/08 20:25:41 dkf Exp $
'\"
.so man.macros
.TH expr n 8.5 Tcl "Tcl Built-In Commands"
@@ -89,7 +89,7 @@ The command will be executed and its result will be used as
the operand.
.IP [7]
As a mathematical function whose arguments have any of the above
-forms for operands, such as \fBsin($x)\fR. See MATH FUNCTIONS below for
+forms for operands, such as \fBsin($x)\fR. See \fBMATH FUNCTIONS\fR below for
a discussion of how mathematical functions are handled.
.LP
Where the above substitutions occur (e.g. inside quoted strings), they
@@ -114,8 +114,9 @@ will produce the value on the right side of the line:
.CE
.SS OPERATORS
.PP
-The valid operators are listed below, grouped in decreasing order
-of precedence:
+The valid operators (most of which are also available as commands in
+the \fBtcl::mathop\fR namespace; see the \fBmathop\fR(n) manual page
+for details) are listed below, grouped in decreasing order of precedence:
.TP 20
\fB\-\0\0+\0\0~\0\0!\fR
Unary minus, unary plus, bit-wise NOT, logical NOT. None of these operators
@@ -350,6 +351,11 @@ The most expensive code is required for
unbraced expressions that contain command substitutions.
These expressions must be implemented by generating new code
each time the expression is executed.
+.VS 8.5
+When the expression is unbraced to allow the substitution of a function or
+operator, consider using the commands documented in the \fBmathfunc\fR(n) or
+\fBmathop\fR(n) manual pages directly instead.
+.VE 8.5
.SH EXAMPLES
Define a procedure that computes an
.QW interesting