Skip to content
Tcl Source Code History Of Ticket 3553586fffffffff
Login

History Of Ticket 3553586fffffffff

Artifacts Associated With Ticket 3553586fffffffff

  1. Ticket change [656c768fdb] (rid 102544) by jmcuaz on 2012-08-02 11:47:35:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      In a proc we did the following mistake: 
      
      return expr {[dict exists $dict $key] ? [dict get $dict $key] : 0}
       wich ought to be :
      return [expr {[dict exists $dict $key] ? [dict get $dict $key] : 0}]
      
      The surprise is that the execution of the faulty code returns an empty string and not an error.
      It might be that the 2nd word "epr" has been intrepreted as an option argument for the third form of return syntax (i.e. return ?option value ...? ?result?), but shoudn't any option begin with a dash ?
      
      On an other (but related) subject, the doc is not very clear about the differences betwen the 2nd (i.e. return ?-code code? ?result?) an third form (return ?option value ...? ?result?) of the syntax of return command : are each form exclusive from the other or can they be mixed together as shown in the examples witten in TIP 90 ?
      
      Many thanks
      
      Jean-Marie
      
      
      
    4. foundin initialized to: "obsolete: 8.5.10"
    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: "jmcuaz"
    10. subsystem initialized to: "18. Commands M-Z"
    11. title initialized to:
      Wrong argument to return command doesnt return error
      
    12. type initialized to: "Bug"
  2. Ticket change [9006d89087] (rid 120370) by dkf on 2012-08-02 21:05:42:

    1. assignee changed to: "dgp"
    2. icomment:
      assign to the master of the rewritten [return]
      
      
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. username: "dkf"
  3. Ticket change [197e73e7e8] (rid 122814) by ferrieux on 2012-08-02 21:12:27:

    1. icomment:
      The generated bytecode for "return a b" is interesting:
      
      % proc f {} {return a b}
      % ::tcl::unsupported::disassemble proc f
      ByteCode 0x0x83a0d28, refCt 1, epoch 5, interp 0x0x834a770 (epoch 5)
        Source "return a b"
        Cmds 1, src 10, inst 14, litObjs 2, aux 0, stkDepth 2, code/src 0.00
        Proc 0x0x83ba258, refCt 1, args 0, compiled locals 0
        Commands 1:
            1: pc 0-12, src 0-9
        Command 1: "return a b"
          (0) push1 0         # ""
          (2) push1 1         # "a b"
          (4) returnImm +0 1 
          (13) done 
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  4. Ticket change [7da802a8ed] (rid 97274) by dgp on 2012-08-02 21:22:11:

    1. closedate changed to: "2012-08-02T14:22:11"
    2. closer changed to: "dgp"
    3. icomment:
      
      
      allow_comments - 1
      
      Not a bug.  [return] accepts any string as an option, for maximum freedom in use by extensions
      and packages.  As proposed (TIP 90) and documented "any values at all are acceptable"
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Invalid"
    7. status changed to: "Closed"
    8. username: "dgp"
  5. Ticket change [20f5317ab4] (rid 130501) by ferrieux on 2012-08-02 23:54:25:

    1. icomment:
      That's a regrettable TIP. I'm sure none of us has ever seen, nor will ever see, code using a return option not prefixed by a dash; while the failure scenario reported here is very common, and goes out of reach due to this move. What about a TIP "-90" ?
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  6. Ticket change [7e1ac61186] (rid 97352) by dkf on 2012-08-03 04:03:27:

    1. icomment:
      We most surely do not wish to remove the whole of TIP 90.
      
      But this is leaving the domain of bug reports. Open a FRQ or write a TIP if you really wish to pursue this; formally, it's currently Not A Bug as it is exactly intended behavior.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  7. Ticket change [8571180d4c] (rid 131314) by ferrieux on 2012-08-03 05:21:03:

    1. icomment:
      Yes, of course I'm not against the whole of TIP 90, which is no less than the completion of the promise that every language construct is first-class...
      
      And yes I admit that the current report falls under the "works as documented" rule.
      
      It's just that the bit about relaxing -OPTION to ANYTHING was unwarranted overgeneralization. Sadly, this has been the case for so long that it is clearly too late to do anything about it. 
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"