Commit 47fb263c authored by Frank Bergmann's avatar Frank Bergmann

- added im_coalesce

parent cd5d545c
......@@ -1897,3 +1897,25 @@ proc string2hex {string} {
}
join $res \n
}
ad_proc -public im_coalesce {
{a ""}
{b ""}
{c ""}
{d ""}
{e ""}
{f ""}
} {
Equivalent of SQL coalesce in TCL
} {
if {"" ne $a} { return $a }
if {"" ne $b} { return $b }
if {"" ne $c} { return $c }
if {"" ne $d} { return $d }
if {"" ne $e} { return $e }
if {"" ne $f} { return $f }
return ""
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment