Name
IsCustomFunction — New as of ColdFusion 5.0
Synopsis
IsCustomFunction( )
Returns True
if the specified
Name
is that of a user-defined function.
The following example uses IsCustomFunction()
to
determine whether Mean
is a user-defined function.
The IsDefined()
function makes sure the name
exists before testing it with IsCustomFunction()
.
If you attempt to evaluate a name that doesn’t exist with
IsCustomFunction()
, ColdFusion throws an error.
<CFSCRIPT> if(IsDefined('Mean') AND IsCustomFunction(Mean)){ WriteOutput("Mean is a custom function!"); } else{ WriteOutput("Mean is not a custom function!"); } </CFSCRIPT>
Get Programming ColdFusion now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.