Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f73fa5201d7afe495c6e3d7313f53cb5f71e9f434c6191b6a60b7a9b1c011d75
Ticket: 95061fc746ea9d8d4c2c244e4f6daa3e6b472150
Line number discrepency
User & Date: anonymous on 2021-06-02 05:10:49
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    My command interface is Tcl based and my aim is to know the line number of a particular command given in a file of Tcl commands. In order to know the line number of the command, I execute the following in my program.
    
    get dict [info frame -1] line
    
    This works perfectly in most cases. However, there is one corner case as below.
    
    1: If { 1 } {
    2:            my_command1 -option1 { object1 \
    3:                                   object2 \
    4                                    object3 }
    5:            my_command2 ….
    6: }
    
    For my_command1, I’m getting the line number correctly as 2. But my_command2, I’m getting the line number as 3 and not as 5.
    
    If I try the same set of commands by commenting ‘if’ construct, I get line number of my_command2 correctly as 5!
    
    1: #If { 1 } {
    2:            my_command1 -option1 { object1 \
    3:                                   object2 \
    4                                    object3 }
    5:            my_command2 ….
    6: #}
    
    I’m wondering if this is a bug with Tcl ‘info frame’ command. Do you know if this is a known issue? Is there anything I could do to fix this problem?
    
    Thanks and regards
    
  5. is_private changed to: "0"
  6. login: "anonymous"
  7. priority changed to: "5 Medium"
  8. resolution changed to: "None"
  9. severity changed to: "Important"
  10. status changed to: "Open"
  11. submitter changed to: "anonymous"
  12. subsystem changed to: "17. Commands I-L"
  13. title changed to: "Line number discrepency"
  14. type changed to: "Bug"