title: “REFLECTION::EXISTU” version: “1.0.0” date: “2023-09-23” author: “laplante@plcb.ca” section: “1g”
reflection::existu checks whether a user-defined function exists.
reflection::existu(string)
existu(string)
This function checks whether a user-defined function exists.
It returns true
if the function is defined and accessible, and false
otherwise.
res={{
package p { func f() {} func g() {} }
func f() {}
existu("abc");
existu("f");
existu("g");
existu("p::f");
existu("p::g");
existu("p::h");
}}.
return
res=falsetruefalsetruetruefalse.