summaryrefslogtreecommitdiffstats
path: root/doc/CrtMathFnc.3
diff options
context:
space:
mode:
Diffstat (limited to 'doc/CrtMathFnc.3')
-rw-r--r--doc/CrtMathFnc.327
1 files changed, 20 insertions, 7 deletions
diff --git a/doc/CrtMathFnc.3 b/doc/CrtMathFnc.3
index d5bd11c..ca3ce33 100644
--- a/doc/CrtMathFnc.3
+++ b/doc/CrtMathFnc.3
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: CrtMathFnc.3,v 1.6 2003/03/26 16:32:57 dgp Exp $
+'\" RCS: @(#) $Id: CrtMathFnc.3,v 1.7 2003/04/16 22:29:20 dkf Exp $
'\"
.so man.macros
.TH Tcl_CreateMathFunc 3 8.4 Tcl "Tcl Library Procedures"
@@ -73,9 +73,13 @@ to those already provided by Tcl or to replace existing functions.
If \fIname\fR doesn't already exist as a function then a new function
is created. If it does exist, then the existing function is replaced.
\fINumArgs\fR and \fIargTypes\fR describe the arguments to the function.
-Each entry in the \fIargTypes\fR array must be either TCL_INT, TCL_DOUBLE,
+Each entry in the \fIargTypes\fR array must be
+.VS 8.4
+one of TCL_INT, TCL_DOUBLE, TCL_WIDE_INT,
or TCL_EITHER to indicate whether the corresponding argument must be an
-integer, a double-precision floating value, or either, respectively.
+integer, a double-precision floating value, a wide (64-bit) integer,
+or any, respectively.
+.VE 8.4
.PP
Whenever the function is invoked in an expression Tcl will invoke
\fIproc\fR. \fIProc\fR should have arguments and result that match
@@ -92,27 +96,36 @@ When \fIproc\fR is invoked the \fIclientData\fR and \fIinterp\fR
arguments will be the same as those passed to \fBTcl_CreateMathFunc\fR.
\fIArgs\fR will point to an array of \fInumArgs\fR Tcl_Value structures,
which describe the actual arguments to the function:
+.VS 8.4
.CS
typedef struct Tcl_Value {
Tcl_ValueType \fItype\fR;
long \fIintValue\fR;
double \fIdoubleValue\fR;
+ Tcl_WideInt \fIwideValue\fR;
} Tcl_Value;
.CE
.PP
The \fItype\fR field indicates the type of the argument and is
-either TCL_INT or TCL_DOUBLE.
+one of TCL_INT, TCL_DOUBLE or TCL_WIDE_INT.
+.VE 8.4
It will match the \fIargTypes\fR value specified for the function unless
the \fIargTypes\fR value was TCL_EITHER. Tcl converts
the argument supplied in the expression to the type requested in
\fIargTypes\fR, if that is necessary.
-Depending on the value of the \fItype\fR field, the \fIintValue\fR
-or \fIdoubleValue\fR field will contain the actual value of the argument.
+Depending on the value of the \fItype\fR field, the \fIintValue\fR,
+.VS 8.4
+\fIdoubleValue\fR or \fIwideValue\fR
+.VE 8.4
+field will contain the actual value of the argument.
.PP
\fIProc\fR should compute its result and store it either as an integer
in \fIresultPtr->intValue\fR or as a floating value in
\fIresultPtr->doubleValue\fR.
-It should set also \fIresultPtr->type\fR to either TCL_INT or TCL_DOUBLE
+It should set also \fIresultPtr->type\fR to one of
+.VS 8.4
+TCL_INT, TCL_DOUBLE or TCL_WIDE_INT
+.VE 8.4
to indicate which value was set.
Under normal circumstances \fIproc\fR should return TCL_OK.
If an error occurs while executing the function, \fIproc\fR should