• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Name

IsCustomFunction

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>


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint