Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 822d6eec9c98d3830dd8f3de03cf6de48a20958d1f3e99c3cac10a6c4483a190
Ticket: d8ae5d5f4c1e248b715b2a2d90ed746dbfb5f2ed
Documentation of dict filter script: script results, not returns a boolean
User & Date: oehhar on 2020-11-02 14:18:38
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed 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 changed to: "8.6.10"
  6. is_private changed to: "0"
  7. login: "oehhar"
  8. priority changed to: "5 Medium"
  9. resolution changed to: "None"
  10. severity changed to: "Minor"
  11. status changed to: "Open"
  12. submitter changed to: "oehhar"
  13. subsystem changed to: "15. Dict Object"
  14. title changed to:
    Documentation of dict filter script: script results, not returns a boolean
    
  15. type changed to: "Bug"