Forum Discussion
MACTEP
Feb 26, 2013Altocumulus
Confirmed, works as expected whenever variable is defined, not defined, has empty or non-empty value.
if {[info exists "static::my_variable"]}{
log local0.err "Variable my_variable is defined"
if {"${static::my_variable}X" eq "X"}{
log local0.err "variable value is empty"
} else {
log local0.err "variable value is ${static::my_variable}"
}
} else {
log local0.err "Variable static::my_variable is NOT defined"
}