⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 evalobj.3

📁 linux系统下的音频通信
💻 3
字号:
'\"'\" Copyright (c) 1996-1997 Sun Microsystems, Inc.'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\" '\" SCCS: @(#) EvalObj.3 1.4 97/01/22 15:18:44'\" .so man.macros.TH Tcl_EvalObj 3 8.0 Tcl "Tcl Library Procedures".BS.SH NAMETcl_EvalObj, Tcl_GlobalEvalObj \- execute Tcl commands.SH SYNOPSIS.nf\fB#include <tcl.h>\fR.spint\fBTcl_EvalObj\fR(\fIinterp, objPtr\fR).spint\fBTcl_GlobalEvalObj\fR(\fIinterp, objPtr\fR).SH ARGUMENTS.AS Tcl_Interp **termPtr;.AP Tcl_Interp *interp inInterpreter in which to execute the command.The command's result will be stored in the interpreter's result objectand can be retrieved using \fBTcl_GetObjResult\fR..AP Tcl_Obj *objPtr inA Tcl object containing a command string(or sequence of commands in a string) to execute..BE.SH DESCRIPTION.PPThese two procedures execute Tcl commands.\fBTcl_EvalObj\fR is the core procedureand is used by \fBTcl_GlobalEvalObj\fR.It executes the commands in the script held by \fIobjPtr\fRuntil either an error occurs or it reaches the end of the script.If this is the first time \fIobjPtr\fR has been executed,its commands are compiled into bytecode instructionsthat are then executed if there are no compilation errors..PPThe return value from \fBTcl_EvalObj\fR is one of the Tcl return codes\fBTCL_OK\fR, \fBTCL_ERROR\fR, \fBTCL_RETURN\fR, \fBTCL_BREAK\fR, or\fBTCL_CONTINUE\fR,and a result object containing additional information(a result value or error message)that can be retrieved using \fBTcl_GetObjResult\fR.If an error occurs during compilation, this return informationdescribes the error.Otherwise, this return information corresponds to the last commandexecuted from \fIobjPtr\fR..PP\fBTcl_GlobalEvalObj\fR is similar to \fBTcl_EvalObj\fR except that itprocesses the command at global level.This means that the variable context for the command consists ofglobal variables only (it ignores any Tcl procedure that is active).This produces an effect similar to the Tcl command ``\fBuplevel 0\fR''..PPDuring the processing of a Tcl command it is legal to make nestedcalls to evaluate other commands (this is how procedures andsome control structures are implemented).If a code other than \fBTCL_OK\fR is returnedfrom a nested \fBTcl_EvalObj\fR invocation,then the caller should normally return immediately,passing that same return code back to its caller,and so on until the top-level application is reached.A few commands, like \fBfor\fR, will check for certainreturn codes, like \fBTCL_BREAK\fR and \fBTCL_CONTINUE\fR, and process themspecially without returning..PP\fBTcl_EvalObj\fR keeps track of how many nested \fBTcl_EvalObj\fRinvocations are in progress for \fIinterp\fR.If a code of \fBTCL_RETURN\fR, \fBTCL_BREAK\fR, or \fBTCL_CONTINUE\fR isabout to be returned from the topmost \fBTcl_EvalObj\fRinvocation for \fIinterp\fR,it converts the return code to \fBTCL_ERROR\fRand sets the interpreter's result objectto point to an error message indicating thatthe \fBreturn\fR, \fBbreak\fR, or \fBcontinue\fR command wasinvoked in an inappropriate place.This means that top-level applications should never see a return codefrom \fBTcl_EvalObj\fR other then \fBTCL_OK\fR or \fBTCL_ERROR\fR..SH "SEE ALSO"Tcl_GetObjResult, Tcl_SetObjResult.SH KEYWORDScommand, execute, file, global, object, object result, variable

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -