Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2021-06-15
17:09 • Ticket [2ffab8476f] where in TCL the source line attribute is assigned/calculate... artifact: 18994d410a user: dgp
2021-06-14
17:38 • New ticket [2ffab8476f]. artifact: 33c32a6ac0 user: arvind29

where in TCL the source line attribute is assigned/calculated/kept?

Open2ffab8476f5abfded9edee758357ae0726aef648Created 5 years agoUpdated 5 years ago
Descriptionplain2021-06-14 17:38:30
The problem we found is that in some cases this script handles line number differently when it’s ran from TCL 8.6.8. We observed line # difference coming from 
“
    proc get_relative_line_number { level } {
        incr level -1
        if {[catch {set info_frame [info frame $level] } ] } {
            return 0
        }
        if {![dict exists $info_frame line]} {
            return 0
        }
        set line [dict get $info_frame line]
        if {$line <= 1} {
            return 0
        }
        return [expr {$line - 1}]
    }
“
at the line  “set line [dict get $info_frame line]”
Do you know where in TCL the source line attribute is assigned/calculated/kept?

Thanks,
Arvind
dgpplain2021-06-15 17:09:12
Do you have a script that makes a complete demonstration of the problem?

Something we can use to repeat the issue will give us the best change to understand and correct it.
Log in (anonymous is fine) to add a comment.