1Tcl_RecordAndEvalObj(3)     Tcl Library Procedures     Tcl_RecordAndEvalObj(3)
2
3
4
5______________________________________________________________________________
6

NAME

8       Tcl_RecordAndEvalObj - save command on history list before evaluating
9

SYNOPSIS

11       #include <tcl.h>
12
13       int
14       Tcl_RecordAndEvalObj(interp, cmdPtr, flags)
15

ARGUMENTS

17       Tcl_Interp *interp (in)          Tcl  interpreter  in which to evaluate
18                                        command.
19
20       Tcl_Obj *cmdPtr (in)             Points to a  Tcl  value  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

DESCRIPTION

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  re‐
38       sult  value  containing additional information (a result value or error
39       message) that can be retrieved using Tcl_GetObjResult.  If you  do  not
40       want  the  command  recorded on the history list then you should invoke
41       Tcl_EvalObjEx instead of Tcl_RecordAndEvalObj.  Normally  Tcl_RecordAn‐
42       dEvalObj  is  only  called  with  top-level commands typed by the user,
43       since the purpose of history is to allow the user to re-issue  recently
44       invoked  commands.   If the flags argument contains the TCL_NO_EVAL bit
45       then the command is recorded without being evaluated.
46
47

SEE ALSO

49       Tcl_EvalObjEx, Tcl_GetObjResult
50
51

KEYWORDS

53       command, event, execute, history, interpreter, value, record
54
55
56
57Tcl                                   8.0              Tcl_RecordAndEvalObj(3)
Impressum