Re: Tcl (Itcl) and default parameters/arguments



Bob Techentin wrote:
> public method a { {p1 VERY_UNLIKELY_DEFAULT} } {
> if { $p1 eq VERY_UNLIKELY_DEFAULT } {
> set p1 $y
> }
> }

Rather than attempt to construct a VERY_UNLIKELY_DEFAULT, you ought
to take the [llength [info level 0]] to determine how many arguments
were passed.

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