diff options
Diffstat (limited to 'doc/ExprLong.3')
-rw-r--r-- | doc/ExprLong.3 | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/doc/ExprLong.3 b/doc/ExprLong.3 index bb00edf..1615f88 100644 --- a/doc/ExprLong.3 +++ b/doc/ExprLong.3 @@ -5,10 +5,8 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ExprLong.3,v 1.9 2004/10/07 16:05:13 dkf Exp $ -'\" -.so man.macros .TH Tcl_ExprLong 3 7.0 Tcl "Tcl Library Procedures" +.so man.macros .BS .SH NAME Tcl_ExprLong, Tcl_ExprDouble, Tcl_ExprBoolean, Tcl_ExprString \- evaluate an expression @@ -17,21 +15,21 @@ Tcl_ExprLong, Tcl_ExprDouble, Tcl_ExprBoolean, Tcl_ExprString \- evaluate an exp \fB#include <tcl.h>\fR .sp int -\fBTcl_ExprLong\fR(\fIinterp, string, longPtr\fR) +\fBTcl_ExprLong\fR(\fIinterp, expr, longPtr\fR) .sp int -\fBTcl_ExprDouble\fR(\fIinterp, string, doublePtr\fR) +\fBTcl_ExprDouble\fR(\fIinterp, expr, doublePtr\fR) .sp int -\fBTcl_ExprBoolean\fR(\fIinterp, string, booleanPtr\fR) +\fBTcl_ExprBoolean\fR(\fIinterp, expr, booleanPtr\fR) .sp int -\fBTcl_ExprString\fR(\fIinterp, string\fR) +\fBTcl_ExprString\fR(\fIinterp, expr\fR) .SH ARGUMENTS .AS Tcl_Interp *booleanPtr out .AP Tcl_Interp *interp in -Interpreter in whose context to evaluate \fIstring\fR or \fIobjPtr\fR. -.AP "const char" *string in +Interpreter in whose context to evaluate \fIexpr\fR. +.AP "const char" *expr in Expression to be evaluated. .AP long *longPtr out Pointer to location in which to store the integer value of the @@ -47,15 +45,15 @@ expression. .SH DESCRIPTION .PP These four procedures all evaluate the expression -given by the \fIstring\fR argument +given by the \fIexpr\fR argument and return the result in one of four different forms. The expression can have any of the forms accepted by the \fBexpr\fR command. Note that these procedures have been largely replaced by the -object-based procedures \fBTcl_ExprLongObj\fR, \fBTcl_ExprDoubleObj\fR, +value-based procedures \fBTcl_ExprLongObj\fR, \fBTcl_ExprDoubleObj\fR, \fBTcl_ExprBooleanObj\fR, and \fBTcl_ExprObj\fR. -Those object-based procedures evaluate an expression held in a Tcl object +Those value-based procedures evaluate an expression held in a Tcl value instead of a string. -The object argument can retain an internal representation +The value argument can retain an internal representation that is more efficient to execute. .PP The \fIinterp\fR argument refers to an interpreter used to @@ -92,19 +90,17 @@ number, then they store 0 at \fI*booleanPtr\fR if the value was zero and 1 otherwise. If the expression's actual value is a non-numeric string then it must be one of the values accepted by \fBTcl_GetBoolean\fR -such as ``yes'' or ``no'', or else an error occurs. +such as +.QW yes +or +.QW no , +or else an error occurs. .PP \fBTcl_ExprString\fR returns the value of the expression as a string stored in the interpreter's result. -If the expression's actual value is an integer -then \fBTcl_ExprString\fR converts it to a string using \fBsprintf\fR -with a ``%d'' converter. -If the expression's actual value is a floating-point -number, then \fBTcl_ExprString\fR calls \fBTcl_PrintDouble\fR -to convert it to a string. .SH "SEE ALSO" Tcl_ExprLongObj, Tcl_ExprDoubleObj, Tcl_ExprBooleanObj, Tcl_ExprObj .SH KEYWORDS -boolean, double, evaluate, expression, integer, object, string +boolean, double, evaluate, expression, integer, value, string |