diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2016-12-21 22:56:22 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2016-12-21 22:56:22 (GMT) |
commit | d1a6de55efc90f190dee42ab8c4fa9070834e77d (patch) | |
tree | ec633f5608ef498bee52a5f42c12c49493ec8bf8 /tcl8.6/doc/RecordEval.3 | |
parent | 5514e37335c012cc70f5b9aee3cedfe3d57f583f (diff) | |
parent | 98acd3f494b28ddd8c345a2bb9311e41e2d56ddd (diff) | |
download | blt-d1a6de55efc90f190dee42ab8c4fa9070834e77d.zip blt-d1a6de55efc90f190dee42ab8c4fa9070834e77d.tar.gz blt-d1a6de55efc90f190dee42ab8c4fa9070834e77d.tar.bz2 |
Merge commit '98acd3f494b28ddd8c345a2bb9311e41e2d56ddd' as 'tcl8.6'
Diffstat (limited to 'tcl8.6/doc/RecordEval.3')
-rw-r--r-- | tcl8.6/doc/RecordEval.3 | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/tcl8.6/doc/RecordEval.3 b/tcl8.6/doc/RecordEval.3 new file mode 100644 index 0000000..e1625ff --- /dev/null +++ b/tcl8.6/doc/RecordEval.3 @@ -0,0 +1,55 @@ +'\" +'\" 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. +'\" +.TH Tcl_RecordAndEval 3 7.4 Tcl "Tcl Library Procedures" +.so man.macros +.BS +.SH NAME +Tcl_RecordAndEval \- save command on history list before evaluating +.SH SYNOPSIS +.nf +\fB#include <tcl.h>\fR +.sp +int +\fBTcl_RecordAndEval\fR(\fIinterp, cmd, flags\fR) +.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. \fBTCL_NO_EVAL\fR means record the +command but do not evaluate it. \fBTCL_EVAL_GLOBAL\fR means evaluate +the 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 event +on the history list and then execute it using \fBTcl_Eval\fR +(or \fBTcl_GlobalEval\fR if the \fBTCL_EVAL_GLOBAL\fR bit is set in \fIflags\fR). +It returns a completion code such as \fBTCL_OK\fR just like \fBTcl_Eval\fR +and it leaves information in the interpreter's result. +If you do not want the command recorded on the history list then +you should invoke \fBTcl_Eval\fR instead of \fBTcl_RecordAndEval\fR. +Normally \fBTcl_RecordAndEval\fR 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 \fIflags\fR argument contains the \fBTCL_NO_EVAL\fR bit then +the command is recorded without being evaluated. +.PP +Note that \fBTcl_RecordAndEval\fR has been largely replaced by the +value-based procedure \fBTcl_RecordAndEvalObj\fR. +That value-based procedure records and optionally executes +a command held in a Tcl value instead of a string. + +.SH "SEE ALSO" +Tcl_RecordAndEvalObj + +.SH KEYWORDS +command, event, execute, history, interpreter, record |