Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/tcl8.5.2/doc/RecEvalObj.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.0 KB
Line 
1'\"
2'\" Copyright (c) 1997 Sun Microsystems, Inc.
3'\"
4'\" See the file "license.terms" for information on usage and redistribution
5'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
6'\"
7'\" RCS: @(#) $Id: RecEvalObj.3,v 1.8 2007/12/13 15:22:31 dgp Exp $
8'\"
9.so man.macros
10.TH Tcl_RecordAndEvalObj 3 8.0 Tcl "Tcl Library Procedures"
11.BS
12.SH NAME
13Tcl_RecordAndEvalObj \- save command on history list before evaluating
14.SH SYNOPSIS
15.nf
16\fB#include <tcl.h>\fR
17.sp
18int
19\fBTcl_RecordAndEvalObj\fR(\fIinterp, cmdPtr, flags\fR)
20.SH ARGUMENTS
21.AS Tcl_Interp *interp
22.AP Tcl_Interp *interp in
23Tcl interpreter in which to evaluate command.
24.AP Tcl_Obj *cmdPtr in
25Points to a Tcl object containing a command (or sequence of commands)
26to 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_RecordAndEvalObj\fR is invoked to record a command as an event
36on the history list and then execute it using \fBTcl_EvalObjEx\fR
37(or \fBTcl_GlobalEvalObj\fR if the \fBTCL_EVAL_GLOBAL\fR bit is set
38in \fIflags\fR).
39It returns a completion code such as \fBTCL_OK\fR just like \fBTcl_EvalObjEx\fR,
40as well as a result object containing additional information
41(a result value or error message)
42that can be retrieved using \fBTcl_GetObjResult\fR.
43If you do not want the command recorded on the history list then
44you should invoke \fBTcl_EvalObjEx\fR instead of \fBTcl_RecordAndEvalObj\fR.
45Normally \fBTcl_RecordAndEvalObj\fR is only called with top-level
46commands typed by the user, since the purpose of history is to
47allow the user to re-issue recently invoked commands.
48If the \fIflags\fR argument contains the \fBTCL_NO_EVAL\fR bit then
49the command is recorded without being evaluated.
50
51.SH "SEE ALSO"
52Tcl_EvalObjEx, Tcl_GetObjResult
53
54.SH KEYWORDS
55command, event, execute, history, interpreter, object, record
Note: See TracBrowser for help on using the repository browser.