Version 2 of line number

Updated 2002-02-06 21:45:14

"How do I calculate the line number of ...?" is a very frequently-asked question.

There's no satisfying answer, in general. While introspection is generally one of Tcl's strengths, no one has yet invested what's necessary to implement a line-number calculation satisfyingly.

[Explain difficulties (byte-coded vs. not, in script vs. proc body vs. eval)?]

[Various ways to instrument existing procedures ... ]

[Tom Tromey once wrote extension (?) to do this. Arjen Markus' Tclcov (?) does a nearly (?) identical instrumentation.]

[tclguy's summary: "it is going to have to be somebody's science project"]