|
coalesce Return the value of the first variable that exists and has a non-null value
package require nstcl-misc ?1.0?
package require nstcl ?1.0?
::nstcl::coalesce ??var1 ?var2 ...varn ?
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.
misc, nstcl