Overview
| Artifact ID: | 656c768fdba803a812511e8dfdcff3f61989a4a8 |
|---|---|
| Ticket: | 3553586fffffffffffffffffffffffffffffffff
Wrong argument to return command doesnt return error |
| User & Date: | jmcuaz on 2012-08-02 11:47:35 |
Changes
- assignee changed to: "dkf"
- cmimetype changed to: "text/plain"
- comment changed 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 - foundin changed to: "obsolete: 8.5.10"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "jmcuaz"
- subsystem changed to: "18. Commands M-Z"
- title changed to:
Wrong argument to return command doesnt return error
- type changed to: "Bug"