1Tcl_RecordAndEvalObj(3) Tcl Library Procedures Tcl_RecordAndEvalObj(3)
2
3
4
5______________________________________________________________________________
6
8 Tcl_RecordAndEvalObj - save command on history list before evaluating
9
11 #include <tcl.h>
12
13 int
14 Tcl_RecordAndEvalObj(interp, cmdPtr, flags)
15
17 Tcl_Interp *interp (in) Tcl interpreter in which to evaluate
18 command.
19
20 Tcl_Obj *cmdPtr (in) Points to a Tcl object containing a
21 command (or sequence of commands) to
22 execute.
23
24 int flags (in) An OR'ed combination of flag bits.
25 TCL_NO_EVAL means record the command
26 but do not evaluate it.
27 TCL_EVAL_GLOBAL means evaluate the
28 command at global level instead of the
29 current stack level.
30_________________________________________________________________
31
32
34 Tcl_RecordAndEvalObj is invoked to record a command as an event on the
35 history list and then execute it using Tcl_EvalObjEx (or Tcl_GlobalE‐
36 valObj if the TCL_EVAL_GLOBAL bit is set in flags). It returns a com‐
37 pletion code such as TCL_OK just like Tcl_EvalObjEx, as well as a
38 result object containing additional information (a result value or
39 error message) that can be retrieved using Tcl_GetObjResult. If you do
40 not want the command recorded on the history list then you should
41 invoke Tcl_EvalObjEx instead of Tcl_RecordAndEvalObj. Normally
42 Tcl_RecordAndEvalObj is only called with top-level commands typed by
43 the user, since the purpose of history is to allow the user to re-issue
44 recently invoked commands. If the flags argument contains the
45 TCL_NO_EVAL bit then the command is recorded without being evaluated.
46
47
49 Tcl_EvalObjEx, Tcl_GetObjResult
50
51
53 command, event, execute, history, interpreter, object, record
54
55
56
57Tcl 8.0 Tcl_RecordAndEvalObj(3)