summaryrefslogtreecommitdiffstats
path: root/doc/CrtMathFnc.3
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2005-04-06 20:55:16 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2005-04-06 20:55:16 (GMT)
commit596f07e4bfed21c35b29972c3be0428e9cd51b5c (patch)
tree5d41883299c2e8bedcd2b437b39c4cbfab40c071 /doc/CrtMathFnc.3
parent854b41f3a7f5c48e906218248a4d28354d4c02e3 (diff)
downloadtcl-596f07e4bfed21c35b29972c3be0428e9cd51b5c.zip
tcl-596f07e4bfed21c35b29972c3be0428e9cd51b5c.tar.gz
tcl-596f07e4bfed21c35b29972c3be0428e9cd51b5c.tar.bz2
Purge old and inaccurate .VS/.VE macros.
Diffstat (limited to 'doc/CrtMathFnc.3')
-rw-r--r--doc/CrtMathFnc.314
1 files changed, 1 insertions, 13 deletions
diff --git a/doc/CrtMathFnc.3 b/doc/CrtMathFnc.3
index 2a23130..1337ea8 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.11 2004/10/07 15:15:35 dkf Exp $
+'\" RCS: @(#) $Id: CrtMathFnc.3,v 1.12 2005/04/06 20:55:20 dkf Exp $
'\"
.so man.macros
.TH Tcl_CreateMathFunc 3 8.4 Tcl "Tcl Library Procedures"
@@ -19,14 +19,12 @@ Tcl_CreateMathFunc, Tcl_GetMathFuncInfo, Tcl_ListMathFuncs \- Define, query and
void
\fBTcl_CreateMathFunc\fR(\fIinterp, name, numArgs, argTypes, proc, clientData\fR)
.sp
-.VS 8.4
int
\fBTcl_GetMathFuncInfo\fR(\fIinterp, name, numArgsPtr, argTypesPtr, procPtr,
clientDataPtr\fR)
.sp
Tcl_Obj *
\fBTcl_ListMathFuncs\fR(\fIinterp, pattern\fR)
-.VE
.SH ARGUMENTS
.AS Tcl_ValueType *clientDataPtr out
.AP Tcl_Interp *interp in
@@ -73,12 +71,10 @@ 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
-.VS 8.4
one of \fBTCL_INT\fR, \fBTCL_DOUBLE\fR, \fBTCL_WIDE_INT\fR,
or \fBTCL_EITHER\fR to indicate whether the corresponding argument must be an
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
@@ -95,7 +91,6 @@ 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;
@@ -107,30 +102,24 @@ typedef struct Tcl_Value {
.PP
The \fItype\fR field indicates the type of the argument and is
one of \fBTCL_INT\fR, \fBTCL_DOUBLE\fR or \fBTCL_WIDE_INT\fR.
-.VE 8.4
It will match the \fIargTypes\fR value specified for the function unless
the \fIargTypes\fR value was \fBTCL_EITHER\fR. 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,
-.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 one of
-.VS 8.4
\fBTCL_INT\fR, \fBTCL_DOUBLE\fR or \fBTCL_WIDE_INT\fR
-.VE 8.4
to indicate which value was set.
Under normal circumstances \fIproc\fR should return \fBTCL_OK\fR.
If an error occurs while executing the function, \fIproc\fR should
return \fBTCL_ERROR\fR and leave an error message in the interpreter's result.
.PP
-.VS 8.4
\fBTcl_GetMathFuncInfo\fR retrieves the values associated with
function \fIname\fR that were passed to a preceding
\fBTcl_CreateMathFunc\fR call. Normally, the return code is
@@ -151,7 +140,6 @@ the math functions defined in the interpreter whose name matches
\fIpattern\fR. In the case of an error, NULL is returned and an error
message is left in the interpreter result, and otherwise the returned
object will have a reference count of zero.
-.VE
.SH KEYWORDS
expression, mathematical function