REFLECTION::EXISTU 1g 2023-09-23 laplante@plcb.ca GOWEB/REFLECTION


title: “REFLECTION::EXISTU” version: “1.0.0” date: “2023-09-23” author: “laplante@plcb.ca” section: “1g”

module: “GOWEB/REFLECTION”

Name

reflection::existu checks whether a user-defined function exists.

Synopsis

reflection::existu(string)
existu(string)

Description

This function checks whether a user-defined function exists.
It returns true if the function is defined and accessible, and false otherwise.

Examples

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.

Author

See also

Version