Artifacts Associated With Ticket d8ae5d5f4c
Ticket change [822d6eec9c] (rid 188292) by oehhar on 2020-11-02 14:18:38:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-wiki"
- 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. - foundin initialized to: "8.6.10"
- is_private initialized to: "0"
- login: "oehhar"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "oehhar"
- subsystem initialized to: "15. Dict Object"
- title initialized to:
Documentation of dict filter script: script results, not returns a boolean
- type initialized to: "Bug"
Ticket change [4d7b3b5eff] (rid 188317) by bll on 2020-11-03 20:06:46:
- 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. - login: "bll"
- mimetype: "text/plain"
- icomment:
Ticket change [c3458a6f91] (rid 188595) by oehhar on 2020-11-16 13:57:12:
- closedate changed to: "2459170.08139427"
- closer changed to: "oehhar"
- icomment:
Committed with [e4f600329a] in branch hao-documentation-tickets for review
- login: "oehhar"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "oehhar"