diff options
author | ericm <ericm> | 2000-04-24 23:52:40 (GMT) |
---|---|---|
committer | ericm <ericm> | 2000-04-24 23:52:40 (GMT) |
commit | b4522af1fcae31bff2fa2c4aa8a8d15e030fa8e2 (patch) | |
tree | b1e94254846affa409d1d99d84fe9b8982895452 /doc/ParseCmd.3 | |
parent | e38c8fdd49d388071ea563f8a0a8fada898eefd9 (diff) | |
download | tcl-b4522af1fcae31bff2fa2c4aa8a8d15e030fa8e2.zip tcl-b4522af1fcae31bff2fa2c4aa8a8d15e030fa8e2.tar.gz tcl-b4522af1fcae31bff2fa2c4aa8a8d15e030fa8e2.tar.bz2 |
* unix/mkLinks:
* doc/ParseCmd.3: Added documentation for Tcl_ParseVar [Bug: 1828].
Diffstat (limited to 'doc/ParseCmd.3')
-rw-r--r-- | doc/ParseCmd.3 | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/doc/ParseCmd.3 b/doc/ParseCmd.3 index 61759bb..4e9e81b 100644 --- a/doc/ParseCmd.3 +++ b/doc/ParseCmd.3 @@ -4,13 +4,13 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ParseCmd.3,v 1.3 1999/08/21 19:40:47 hobbs Exp $ +'\" RCS: @(#) $Id: ParseCmd.3,v 1.4 2000/04/24 23:53:03 ericm Exp $ '\" .so man.macros -.TH Tcl_ParseCommand 3 8.1 Tcl "Tcl Library Procedures" +.TH Tcl_ParseCommand 3 8.3 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_ParseCommand, Tcl_ParseExpr, Tcl_ParseBraces, Tcl_ParseQuotedString, Tcl_ParseVarName, Tcl_FreeParse, Tcl_EvalTokens \- parse Tcl scripts and expressions +Tcl_ParseCommand, Tcl_ParseExpr, Tcl_ParseBraces, Tcl_ParseQuotedString, Tcl_ParseVarName, Tcl_ParseVar, Tcl_FreeParse, Tcl_EvalTokens \- parse Tcl scripts and expressions .SH SYNOPSIS .nf \fB#include <tcl.h>\fR @@ -30,6 +30,9 @@ int int \fBTcl_ParseVarName\fR(\fIinterp, string, numBytes, parsePtr, append\fR) .sp +char * +\fBTcl_ParseVar\fR(\fIinterp, string, termPtr\fR) +.sp \fBTcl_FreeParse\fR(\fIusedParsePtr\fR) .sp Tcl_Obj * @@ -66,9 +69,10 @@ is ignored, unless \fIappend\fR is non-zero in a call to or \fBTcl_ParseVarName\fR. .AP char **termPtr out If not NULL, points to a location where -\fBTcl_ParseBraces\fR and \fBTcl_ParseQuotedString\fR -will store a pointer to the character -just after the terminating close-brace or close-quote (respectively) +\fBTcl_ParseBraces\fR, \fBTcl_ParseQuotedString\fR, and +\fBTcl_ParseVar\fR will store a pointer to the character +just after the terminating character (the close-brace, the last +character of the variable name, or the close-quote (respectively)) if the parse was successful. .AP Tcl_Parse *usedParsePtr in Points to structure that was filled in by a previous call to @@ -154,6 +158,14 @@ occurrs while parsing the command then \fBTCL_ERROR\fR is returned, an error message is left in \fIinterp\fR's result (if \fIinterp\fR isn't NULL), and no information is left at \fI*parsePtr\fR. .PP +\fBTcl_ParseVar\fR parse a Tcl variable reference such as \fB$abc\fR +or \fB$x([expr $index + 1])\fR from the beginning of its \fIstring\fR +argument. The first character of \fIstring\fR must be \fB$\fR. If +the variable name is parsed successfully, \fBTcl_ParseVar\fR returns a +pointer to the string value of the variable. If an error occurs while +parsing, then NULL is returned and an error message is left in +\fIinterp\fR's result. +.PP The information left at \fI*parsePtr\fR by \fBTcl_ParseCommand\fR, \fBTcl_ParseExpr\fR, \fBTcl_ParseBraces\fR, \fBTcl_ParseQuotedString\fR, and \fBTcl_ParseVarName\fR |