Re: A tcl command logger?

From: Don Porter (dgp_at_email.nist.gov)
Date: 03/24/05


Date: 24 Mar 2005 21:02:56 GMT

Helmut Giese wrote:
>> newer versions of Tcl allow you to set traces on command execution,
>> and even fine-graining this whether you want to trace 'enter' or
>> 'leave'

George Petasis wrote:
> Thank you both for your answers. However, as it has to run to
> tcl 8.4,

Execution traces are in Tcl 8.4.

> What was
> surprising though was to find that the 'if' command calls
> 'expr' to make the evaluation.

No, it doesn't.

> I would have expected 'if' to call the C API that
> 'expr' uses directly.

It does; why do you believe otherwise.

More precisely, the expression evaluations are compiled into bytecode,
which gets executed.

> b) If anybody messes with 'expr', also 'if' (and possibly 'while',
> 'for', etc) will be affected. Is this something expected?

"messes with 'expr'" how, exactly?

-- 
| Don Porter          Mathematical and Computational Sciences Division |
| donald.porter@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|


Relevant Pages

  • Re: Embedding a Tclinterp : some pointers requested !
    ... If you need an example code for parsing TCL, ... >> - canceling the execution ... >> - it does not allow to stop the interpretation in case of an infinite ... >> loop within the current command given to Tcl_Eval ...
    (comp.lang.tcl)
  • Re: threads & callbacks...
    ... Normally in Tcl threading extension you can post a script from thread A ... Tcl itself has no such call built in the core which would allow you to ... This one will allow you to send a script for execution ...
    (comp.lang.tcl)
  • Re: Tcl_Obj/script recompilation question
    ... > I have a scenario where, over the course of an application execution, ... > interpreters during their life will execute a handfull of Tcl scripts ...
    (comp.lang.tcl)
  • Re: dynamic library issue in windows
    ... from a tcl script using the "load" command. ... The issue here is when the script is executed multiple times, ... During the first execution, the sample_funcis executed and the flag ... It depends, on Windows it is possible to have process static and shared static variables. ...
    (comp.lang.tcl)
  • Re: Timeout when idle
    ... So it's blocked during command execution. ... The Qt loop includes a selecton stdin, ... Tcl is strictly a synchronous callee of the ... cancel the previous setitimer() just before ...
    (comp.lang.tcl)