nstcl  >  Documentation  >  nstcl-misc  >  coalesce

Tcl Powered!

coalesce

NAME

coalesce — Return the value of the first variable that exists and has a non-null value

SYNOPSIS

package require nstcl-misc ?1.0?
package require nstcl ?1.0?

::nstcl::coalesce ?? var1 ?var2 ... varn?

DESCRIPTION

This command will return the value of the first variable that exists in the callers enviroment that does not equal the empty string, i.e. {}. If the optional -default switch is present and no non-null variables are found to exist then the value given to the -default switch will be returned.

KEYWORDS

misc, nstcl