From: SourceForge.net <no...@so...> - 2012-08-02 14:05:44
|
Bugs item #3553586, was opened at 2012-08-02 04:47 Message generated for change (Comment added) made by dkf You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3553586&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 18. Commands M-Z Group: obsolete: 8.5.10 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jean-Marie Cuaz (jmcuaz) >Assigned to: Don Porter (dgp) Summary: Wrong argument to return command doesnt return error Initial Comment: 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 ---------------------------------------------------------------------- >Comment By: Donal K. Fellows (dkf) Date: 2012-08-02 07:05 Message: assign to the master of the rewritten [return] ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3553586&group_id=10894 |