Skip to content
Tcl Source Code History Of Ticket d8ae5d5f4c1e248b
Login

History Of Ticket d8ae5d5f4c1e248b

Artifacts Associated With Ticket d8ae5d5f4c1e248b

  1. Ticket change [822d6eec9c] (rid 188292) by oehhar on 2020-11-02 14:18:38:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      The description of dict filter script includes:
      "and then evaluating the given script which should return a boolean value."
      
      IMHO, the script should result in a boolean value, not return one.
      For me, "return" is the return command, not a result.
      
      I tried:
      <verbatim>
      % dict filter {a 1 b 2} script {k v} {return 1}
      1
      % dict filter {a 1 b 2} script {k v} {expr 1}
      a 1 b 2
      </verbatim>
      
      Perhaps I am dump, but the description lead me to this error.
      
      References below.
      
      Thank you,
      Harald
      
      See [http://www.tcl.tk/man/tcl8.6/TclCmd/dict.htm#M10] :
      
      dict filter dictionaryValue script {keyVariable valueVariable} script
      
      The script rule tests for matching by assigning the key to the keyVariable and the value to the valueVariable, and then evaluating the given script which should return a boolean value.
      
    5. foundin initialized to: "8.6.10"
    6. is_private initialized to: "0"
    7. login: "oehhar"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "oehhar"
    13. subsystem initialized to: "15. Dict Object"
    14. title initialized to:
      Documentation of dict filter script: script results, not returns a boolean
      
    15. type initialized to: "Bug"
  2. Ticket change [4d7b3b5eff] (rid 188317) by bll on 2020-11-03 20:06:46:

    1. icomment:
      The 'return 1' is returning from the current scope.
      If you used:
        proc z { } {return 1}
        dict filter {a 1 b 2} script {k v} z
      it would work.
      
      The inline-script is not processed in the same manner as normal scripts,
      and I suspect is not creating a new scope.
      
      There are several commands that use these inline-scripts.  I don't like them.
      It's like having a secondary language within Tcl.
      
      Not that the documentation about break and continue only apply to the
      inline-script, not to any script called by the inline-script.
      
    2. login: "bll"
    3. mimetype: "text/plain"
  3. Ticket change [c3458a6f91] (rid 188595) by oehhar on 2020-11-16 13:57:12:

    1. closedate changed to: "2459170.08139427"
    2. closer changed to: "oehhar"
    3. icomment:
      Committed with [e4f600329a] in branch hao-documentation-tickets for review
      
    4. login: "oehhar"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "oehhar"