template::util::is_nil (public)

 template::util::is_nil ref

Defined in packages/acs-templating/tcl/util-procs.tcl

Determines whether a variable both exists and is not an empty string.

Parameters:
ref (required)
The name of a variable to test in the calling frame.
Returns:
1 if the variable either not exist or is an empty string. 0 if the variable is either an array reference or a nonempty scalar.

Testcases:
util_is_nil
Source code:
    upvar $ref var

    return [expr { ![array exists var] && (![info exists var] || $var eq "") }]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: