Skip to content
Tcl Source Code History Of Ticket 2134049fffffffffffffffffffffffffffffffff
Login

History Of Ticket 2134049fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 2134049fffffffffffffffffffffffffffffffff

  1. Ticket change [99bc00cb3b] (rid 110842) by lars_h on 2008-09-28 12:11:14:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The description of what [info frame] does when given a positive level argument is as follows:
      
        If number is positive (> 0) then it selects a particular 
        stack level (1 refers to the top-most active command, 
        i.e., info frame itself, 2 to the command it was called 
        from, and so on)
      
      However, [info frame] is in practice almost never the top-most active command, so this is wrong. Defining
      
      proc nest {levels} {
        if {$levels<1} then {
          for {set n 1} {$n<=[info frame]} {incr n} {
            puts [format {%d: %s} $n [info frame $n]]
          }
        } else {
          nest [incr levels -1]
        }
      }
      
      one gets
      
      % nest 3
      1: type eval line 1 cmd {nest 3} level 4
      2: type proc line 7 cmd {nest [incr levels -1]} proc ::nest level 3
      3: type proc line 7 cmd {nest [incr levels -1]} proc ::nest level 2
      4: type proc line 7 cmd {nest [incr levels -1]} proc ::nest level 1
      5: type proc line 4 cmd {info frame $n} proc ::nest level 0
      
      i.e., it is [info frame [info frame]] that selects the info frame call itself.
      
      Also wrong is the claim that [info frame 2] provides information about the command from which [dict get [info frame 1] cmd] was called, since the above shows it is really the other way around: [dict get [info frame 1] cmd] caused [dict get [info frame 2] cmd] to be called.
      
      The corresponding sentence in the description of [info level] describes these relationships correctly:
      
        If number is positive then it selects a particular stack level 
        (1 refers to the top-most active procedure, 2 to the 
        procedure it called, and so on);
      
      Possibly it is the use of "top-most" that confuses the issue (does the stack grow top to bottom or bottom to top?), so maybe it would be a good idea to replace this term by "outermost".
      
      An alternative wording is:
      
        If number is positive then it selects a particular 
        stack level (1 refers to the outermost active procedure, 
        2 to the procedure it called, and so on, up to the current 
        frame level which refers to the info frame itself);
      
      
      
    4. foundin initialized to: "obsolete: 8.5.4"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "lars_h"
    10. subsystem initialized to: "17. Commands I-L"
    11. title initialized to: "info frame documentation error"
    12. type initialized to: "Bug"
  2. Ticket change [300e3f3e13] (rid 93181) by dkf on 2008-09-29 03:15:44:

    1. assignee changed to: "andreas_kupries"
  3. Ticket change [f2808c66c9] (rid 109552) by andreas_kupries on 2008-10-03 06:04:35:

    1. closedate changed to: "2008-10-02T23:04:35"
    2. closer changed to: "andreas_kupries"
    3. icomment:
      Committed to head. 'info level' is actually described in that way.
      
      
      
    4. login: "andreas_kupries"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "andreas_kupries"