📄 recordeval.3
字号:
'\"'\" Copyright (c) 1989-1993 The Regents of the University of California.'\" Copyright (c) 1994-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: @(#) RecordEval.3 1.18 97/07/29 18:25:13'\" .so man.macros.TH Tcl_RecordAndEval 3 7.4 Tcl "Tcl Library Procedures".BS.SH NAMETcl_RecordAndEval \- save command on history list before evaluating.SH SYNOPSIS.nf\fB#include <tcl.h>\fR.spint\fBTcl_RecordAndEval\fR(\fIinterp, cmd, flags\fR).SH ARGUMENTS.AS Tcl_Interp *interp;.AP Tcl_Interp *interp inTcl interpreter in which to evaluate command..AP char *cmd inCommand (or sequence of commands) to execute..AP int flags inAn OR'ed combination of flag bits. TCL_NO_EVAL means record thecommand but don't evaluate it. TCL_EVAL_GLOBAL means evaluatethe command at global level instead of the current stack level..BE.SH DESCRIPTION.PP\fBTcl_RecordAndEval\fR is invoked to record a command as an eventon the history list and then execute it using \fBTcl_Eval\fR(or \fBTcl_GlobalEval\fR if the TCL_EVAL_GLOBAL bit is set in \fIflags\fR).It returns a completion code such as TCL_OK just like \fBTcl_Eval\fRand it leaves information in \fIinterp->result\fR.If you don't want the command recorded on the history list thenyou should invoke \fBTcl_Eval\fR instead of \fBTcl_RecordAndEval\fR.Normally \fBTcl_RecordAndEval\fR is only called with top-levelcommands typed by the user, since the purpose of history is toallow the user to re-issue recently-invoked commands.If the \fIflags\fR argument contains the TCL_NO_EVAL bit thenthe command is recorded without being evaluated..PPNote that \fBTcl_RecordAndEval\fR has been largely replaced by theobject-based procedure \fBTcl_RecordAndEvalObj\fR.That object-based procedure records and optionally executesa command held in a Tcl object instead of a string..SH "SEE ALSO"Tcl_RecordAndEvalObj.SH KEYWORDScommand, event, execute, history, interpreter, record
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -