Re: Tcl (Itcl) and default parameters/arguments
- From: Don Porter <dgp@xxxxxxxxxxxxxx>
- Date: 30 Aug 2005 00:58:47 GMT
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 |
|______________________________________________________________________|
.
- Follow-Ups:
- Re: Tcl (Itcl) and default parameters/arguments
- From: Bob Techentin
- Re: Tcl (Itcl) and default parameters/arguments
- References:
- Tcl (Itcl) and default parameters/arguments
- From: MH
- Re: Tcl (Itcl) and default parameters/arguments
- From: Bob Techentin
- Tcl (Itcl) and default parameters/arguments
- Prev by Date: Re: [clock] behaves just slow (Re: [clock scan] behaves inconsistently in Tcl8.5 (was: Re: [clock scan day] behaves differentyl in Tcl8.5 than in Tcl8.4))
- Next by Date: Re: installing BLT 2.4z
- Previous by thread: Re: Tcl (Itcl) and default parameters/arguments
- Next by thread: Re: Tcl (Itcl) and default parameters/arguments
- Index(es):