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

NAME

8       Tcl_RecordAndEval - save command on history list before evaluating
9

SYNOPSIS

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

ARGUMENTS

17       Tcl_Interp *interp (in)          Tcl  interpreter  in which to evaluate
18                                        command.
19
20       const char *cmd (in)             Command (or sequence of  commands)  to
21                                        execute.
22
23       int flags (in)                   An  OR'ed  combination  of  flag bits.
24                                        TCL_NO_EVAL means record  the  command
25                                        but     do     not     evaluate    it.
26                                        TCL_EVAL_GLOBAL  means  evaluate   the
27                                        command at global level instead of the
28                                        current stack level.
29______________________________________________________________________________
30
31

DESCRIPTION

33       Tcl_RecordAndEval is invoked to record a command as  an  event  on  the
34       history  list  and then execute it using Tcl_Eval (or Tcl_GlobalEval if
35       the TCL_EVAL_GLOBAL bit is set in flags).  It returns a completion code
36       such  as TCL_OK just like Tcl_Eval and it leaves information in the in‐
37       terpreter's result.  If you do not want the  command  recorded  on  the
38       history list then you should invoke Tcl_Eval instead of Tcl_RecordAndE‐
39       val.  Normally Tcl_RecordAndEval is only called with top-level commands
40       typed by the user, since the purpose of history is to allow the user to
41       re-issue recently-invoked commands.  If the flags argument contains the
42       TCL_NO_EVAL bit then the command is recorded without being evaluated.
43
44       Note  that  Tcl_RecordAndEval  has  been largely replaced by the value-
45       based  procedure  Tcl_RecordAndEvalObj.   That  value-based   procedure
46       records  and  optionally executes a command held in a Tcl value instead
47       of a string.
48
49

SEE ALSO

51       Tcl_RecordAndEvalObj
52
53

KEYWORDS

55       command, event, execute, history, interpreter, record
56
57
58
59Tcl                                   7.4                 Tcl_RecordAndEval(3)
Impressum