RecordEval.3
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:2k
- '"
- '" 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.
- '"
- '" RCS: @(#) $Id: RecordEval.3,v 1.4 2002/01/16 06:02:33 dgp Exp $
- '"
- .so man.macros
- .TH Tcl_RecordAndEval 3 7.4 Tcl "Tcl Library Procedures"
- .BS
- .SH NAME
- Tcl_RecordAndEval - save command on history list before evaluating
- .SH SYNOPSIS
- .nf
- fB#include <tcl.h>fR
- .sp
- int
- fBTcl_RecordAndEvalfR(fIinterp, cmd, flagsfR)
- .SH ARGUMENTS
- .AS Tcl_Interp *interp;
- .AP Tcl_Interp *interp in
- Tcl interpreter in which to evaluate command.
- .AP "CONST char" *cmd in
- Command (or sequence of commands) to execute.
- .AP int flags in
- An OR'ed combination of flag bits. TCL_NO_EVAL means record the
- command but don't evaluate it. TCL_EVAL_GLOBAL means evaluate
- the command at global level instead of the current stack level.
- .BE
- .SH DESCRIPTION
- .PP
- fBTcl_RecordAndEvalfR is invoked to record a command as an event
- on the history list and then execute it using fBTcl_EvalfR
- (or fBTcl_GlobalEvalfR if the TCL_EVAL_GLOBAL bit is set in fIflagsfR).
- It returns a completion code such as TCL_OK just like fBTcl_EvalfR
- and it leaves information in the interpreter's result.
- If you don't want the command recorded on the history list then
- you should invoke fBTcl_EvalfR instead of fBTcl_RecordAndEvalfR.
- Normally fBTcl_RecordAndEvalfR is only called with top-level
- commands typed by the user, since the purpose of history is to
- allow the user to re-issue recently-invoked commands.
- If the fIflagsfR argument contains the TCL_NO_EVAL bit then
- the command is recorded without being evaluated.
- .PP
- Note that fBTcl_RecordAndEvalfR has been largely replaced by the
- object-based procedure fBTcl_RecordAndEvalObjfR.
- That object-based procedure records and optionally executes
- a command held in a Tcl object instead of a string.
- .SH "SEE ALSO"
- Tcl_RecordAndEvalObj
- .SH KEYWORDS
- command, event, execute, history, interpreter, record