is-null
)Checks if a variable is null or undefined
is-null
checks if a variable is null or undefined. If
multiple variables are passed in is-null
’s parameters, the
exit number will be a count of the number of non-null variables
checked.
is-null
is intended to be run non-interactively, where
it doesn’t write to stdout but instead communicates its results via exit
number. However if stdout is a TTY is-null
will
additionally write to the terminal.
The following conditions are considered “null” by
is-null
:
null
or a value of null.Zero length strings, strings containing the word “null” and numeric
data types (eg num
, int
, float
with the value of 0
) are all not null.
is-null variable_name... -> <stdout>
» $baz = ""
» is-null foo bar baz
foo: undefined or null
bar: undefined or null
baz: defined and not null
if { is-null foobar } then {
out "baz is undefined"
}
export
): Define an environmental variable and set it’s
valueglobal
): Define a global variable and set it’s
valueset
):
Define a variable (typically local) and set it’s value??
Null
Coalescing Operator: Returns the right operand if the left operand
is empty / undefined (expression)This document was generated from builtins/core/typemgmt/isnull_doc.yaml.
This site's content is rebuilt automatically from murex's source code after each merge to the master
branch. Downloadable murex binaries are also built with the website.
Last built on Wed Jan 15 23:07:50 UTC 2025 against commit b4c4296b4c429617fd41527ea0efef33c52c15ef2b64972.
Current version is 6.4.2063 (develop) which has been verified against tests cases.