summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-12-10 20:54:49 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-12-10 20:54:49 (GMT)
commitaaf8665696cd7b0d91922cf047daf8e0eb29816e (patch)
tree155d0247e71240908708605203ad917c1faf9d96 /doc
parente4dd07e73542f12fbf267871ea7ea57b1f2e935e (diff)
parent15f02f424cbc25390850f6be03592853eab1fa8b (diff)
downloadtcl-aaf8665696cd7b0d91922cf047daf8e0eb29816e.zip
tcl-aaf8665696cd7b0d91922cf047daf8e0eb29816e.tar.gz
tcl-aaf8665696cd7b0d91922cf047daf8e0eb29816e.tar.bz2
merge trunk
Diffstat (limited to 'doc')
-rw-r--r--doc/expr.n16
1 files changed, 14 insertions, 2 deletions
diff --git a/doc/expr.n b/doc/expr.n
index 6b6e944..48385cf 100644
--- a/doc/expr.n
+++ b/doc/expr.n
@@ -39,9 +39,9 @@ additional operators not found in C.
.SS OPERANDS
.PP
A Tcl expression consists of a combination of operands, operators,
-and parentheses.
+parentheses and commas.
White space may be used between the operands and operators and
-parentheses; it is ignored by the expression's instructions.
+parentheses (or commas); it is ignored by the expression's instructions.
Where possible, operands are interpreted as integer values.
Integer values may be specified in decimal (the normal case), in binary
(if the first two characters of the operand are \fB0b\fR), in octal
@@ -280,6 +280,18 @@ rules for resolving functions in namespaces. Either
current]::tcl::mathfunc::sin\fR will satisfy the request, and others
may as well (depending on the current \fBnamespace path\fR setting).
.PP
+Some mathematical functions have several arguments, separated by commas like in C. Thus:
+.PP
+.CS
+\fBexpr\fR {hypot($x,$y)}
+.CE
+.PP
+ends up as
+.PP
+.CS
+tcl::mathfunc::hypot $x $y
+.CE
+.PP
See the \fBmathfunc\fR(n) manual page for the math functions that are
available by default.
.SS "TYPES, OVERFLOW, AND PRECISION"