diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2007-12-08 20:25:40 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2007-12-08 20:25:40 (GMT) |
commit | c63800fafacdbb36b826ca84d62559fda1c77485 (patch) | |
tree | df9ed9b441e976abbde0a24e90ff16212e536ed1 /doc/expr.n | |
parent | 663ddf0e85629ebc17b2b0a161119f97df0f9e97 (diff) | |
download | tcl-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.n | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -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 |