Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/tcl8.5.2/doc/RecordEval.3 @ 25

Last change on this file since 25 was 25, checked in by landauf, 16 years ago

added tcl to libs

File size: 2.1 KB
Line 
1'\"
2'\" Copyright (c) 1989-1993 The Regents of the University of California.
3'\" Copyright (c) 1994-1997 Sun Microsystems, Inc.
4'\"
5'\" See the file "license.terms" for information on usage and redistribution
6'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
7'\"
8'\" RCS: @(#) $Id: RecordEval.3,v 1.10 2007/12/13 15:22:31 dgp Exp $
9'\"
10.so man.macros
11.TH Tcl_RecordAndEval 3 7.4 Tcl "Tcl Library Procedures"
12.BS
13.SH NAME
14Tcl_RecordAndEval \- save command on history list before evaluating
15.SH SYNOPSIS
16.nf
17\fB#include <tcl.h>\fR
18.sp
19int
20\fBTcl_RecordAndEval\fR(\fIinterp, cmd, flags\fR)
21.SH ARGUMENTS
22.AS Tcl_Interp *interp
23.AP Tcl_Interp *interp in
24Tcl interpreter in which to evaluate command.
25.AP "const char" *cmd in
26Command (or sequence of commands) to execute.
27.AP int flags in
28An OR'ed combination of flag bits.  \fBTCL_NO_EVAL\fR means record the
29command but do not evaluate it.  \fBTCL_EVAL_GLOBAL\fR means evaluate
30the command at global level instead of the current stack level.
31.BE
32
33.SH DESCRIPTION
34.PP
35\fBTcl_RecordAndEval\fR is invoked to record a command as an event
36on the history list and then execute it using \fBTcl_Eval\fR
37(or \fBTcl_GlobalEval\fR if the \fBTCL_EVAL_GLOBAL\fR bit is set in \fIflags\fR).
38It returns a completion code such as \fBTCL_OK\fR just like \fBTcl_Eval\fR
39and it leaves information in the interpreter's result.
40If you do not want the command recorded on the history list then
41you should invoke \fBTcl_Eval\fR instead of \fBTcl_RecordAndEval\fR.
42Normally \fBTcl_RecordAndEval\fR is only called with top-level
43commands typed by the user, since the purpose of history is to
44allow the user to re-issue recently-invoked commands.
45If the \fIflags\fR argument contains the \fBTCL_NO_EVAL\fR bit then
46the command is recorded without being evaluated.
47.PP
48Note that \fBTcl_RecordAndEval\fR has been largely replaced by the
49object-based procedure \fBTcl_RecordAndEvalObj\fR.
50That object-based procedure records and optionally executes
51a command held in a Tcl object instead of a string.
52
53.SH "SEE ALSO"
54Tcl_RecordAndEvalObj
55
56.SH KEYWORDS
57command, event, execute, history, interpreter, record
Note: See TracBrowser for help on using the repository browser.