Re: List as default value... another bug? Take a look, please...



ZB wrote:
#v+
proc a_proc { {abc [list]} } {
puts [llength $abc]
}

tclsh8.5 [~]a_proc
1

That is correct.

If you do not agree, please review the rules for
brace-quoted words and what that means about
substitution within them.

--
| Don Porter Mathematical and Computational Sciences Division |
| donald.porter@xxxxxxxx Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|______________________________________________________________________|
.



Relevant Pages

  • Re: Haldanes Dilemma
    ... > a clearer view of the cost of substitution. ... > This is easily verified with Internet search-engines. ... > In a recently completed review (at the journal, ...
    (sci.bio.evolution)
  • Re: Haldanes Dilemma
    ... > a clearer view of the cost of substitution. ... > This is easily verified with Internet search-engines. ... I would be happy to see a more thoughtful review of it than is ... NG regarding "the sociology of science", ...
    (sci.bio.evolution)
  • Yet another tcl regsub problem
    ... Now I need to substitute $abc preceeded by multiple spaces to $def ... set str "this WAS a test str which is driving me crazy" ... Strangely if I don't use $abc and $def variables then substitution ...
    (comp.lang.tcl)
  • Re: Dont include category X labels if row empty
    ... Click the down arrow next to ABC and select Nonblanks. ... blanks will not appear in the chart, because by default, hidden cells are ... Month Review ...
    (microsoft.public.excel.charting)
  • Re: List as default value... another bug? Take a look, please...
    ... You can use for a default argument value, you just need to remember Tcl's quoting rules: a brace-delimited word prevents substitution of commands and variables inside it. ... puts [llength $abc] ...
    (comp.lang.tcl)

Loading