diff options
author | dkf <dkf@noemail.net> | 2003-04-16 22:26:14 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2003-04-16 22:26:14 (GMT) |
commit | 15886c77615db0387ab3094210cd8e1173a0b382 (patch) | |
tree | 6ce4c3f2237ddcb32e98c36424d86cfe363b23af /doc/CrtMathFnc.3 | |
parent | 3b65e4156f5afc190080e49bcf9377179c64a730 (diff) | |
download | tcl-15886c77615db0387ab3094210cd8e1173a0b382.zip tcl-15886c77615db0387ab3094210cd8e1173a0b382.tar.gz tcl-15886c77615db0387ab3094210cd8e1173a0b382.tar.bz2 |
Math funcs might have to deal with wide ints; document this. [Bug 709720]
FossilOrigin-Name: ef18c20b1eade289fc5453b06050a4b407ed06bc
Diffstat (limited to 'doc/CrtMathFnc.3')
-rw-r--r-- | doc/CrtMathFnc.3 | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/doc/CrtMathFnc.3 b/doc/CrtMathFnc.3 index 77bd681..8f2b80b 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.5.14.1 2003/03/26 16:32:20 dgp Exp $ +'\" RCS: @(#) $Id: CrtMathFnc.3,v 1.5.14.2 2003/04/16 22:26:16 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 |