hmm...
I think isDeclared() is suitable for that too.
instead of looking for a var, one could look for udf name:

if isDeclared(UDFname)
"udf is declared."
endif
_________________________
!

download KiXnet