Determines whether a function be called as a custom function. Displays information about a user-defined function.
True, if name can be called as a custom function; False, otherwise.
IsCustomFunction("name")
Parameter | Description |
---|---|
name |
Name of a custom function, between quotation marks. |
The following example generates the following output:
realUDF is a function.
<h3>IsCustomFunction</h3> <cfscript> function realUDF() { return 1; } </cfscript> <CFSET X = 1> <!--- example that fails completely ---> <CFIF IsDefined("Foo") AND IsCustomFunction("Foo")> Foo is a UDF.<br> </CFIF> <!--- Example that passes, for X, but fails on IsCustomFunction ---> <CFIF IsDefined("X") AND IsCustomFunction("X")> X is a UDF.<br> </CFIF> <!--- Example that passes ---> <CFIF IsDefined("realUDF") AND IsCustomFunction("realUDF")> realUDF is a function.<br> </CFIF>