Tcl Source Code

Artifact [11cda3701a]
Login

Artifact 11cda3701a7992062ac74739405e02ca4153dbc5671deea9c9f5dc7d465db1bd:

Attachment "exercise.tcl" to ticket [0e3f777ed5] added by erikleunissen 2026-07-25 15:23:12.
proc p {} {
    # This proc needs to hold at least one (arbitrary) command
    # for enterstep traces to work.
    puts "p invoked"
}
proc handleTrace1 {args} {
    trace remove execution p enterstep handleTrace1
}
proc handleTrace0 {args} {
    trace add execution p enterstep handleTrace1
}
trace add execution p leave handleTrace0
trace add execution p leave handleTrace0
p
p