NAME
TclRecordAndEvalObj - save command on history list before evaluating
SYNOPSIS
##iinncclluuddee <
int TTccllRReeccoorrddAAnnddEEvvaallOObbjj(interp, cmdPtr, flags) AARRGGUUMMEENNTTSS TclInterp *interp (in) Tcl interpreter in which to evaluate command. TclObj *cmdPtr (in) Points to a Tcl object containing a command (or sequence of commands) to execute. int flags (in) An OR'ed combination of flag bits. TCLNOEVAL means record the command but don't evaluate it. TCLEVALGLOBAL means evaluate the command at global level instead of the current stack level.> DESCRIPTION
TTccllRReeccoorrddAAnnddEEvvaallOObbjj is invoked to record a command as an event on thehistory list and then execute it using TTccllEEvvaallOObbjjEExx (or TTccllGGlloobbaallEE-
vvaallOObbjj if the TCLEVALGLOBAL bit is set in flags). It returns a com-
pletion code such as TCLOK just like TTccllEEvvaallOObbjjEExx, as well as a result object containing additional information (a result value or error message) that can be retrieved using TTccllGGeettOObbjjRReessuulltt. If you don't want the command recorded on the history list then you should invoke TTccllEEvvaallOObbjjEExx instead of TTccllRReeccoorrddAAnnddEEvvaallOObbjj. NormallyTTccllRReeccoorrddAAnnddEEvvaallOObbjj is only called with top-level commands typed by
the user, since the purpose of history is to allow the user to re-issue
recently-invoked commands. If the flags argument contains the
TCLNOEVAL bit then the command is recorded without being evaluated.SEE ALSO
TclEvalObjEx, TclGetObjResult KKEEYYWWOORRDDSS command, event, execute, history, interpreter, object, record Tcl 8.0 TclRecordAndEvalObj(3)