• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

20. User-Defined Functions

Chapter 20. User-Defined Functions

Since their introduction in ColdFusion 5.0, user-defined functions (UDFs) have become a cornerstone of the CFML language. UDFs give you the ability to create custom that can be called inline, just like other ColdFusion functions. UDFs allow you to extend ColdFusion’s core set of functions with custom functions that encapsulate programming tasks not currently addressed by CFML. For example, there is no CFML function for calculating the mean (average value) of a delimited list of numeric values. Rather than writing code that uses multiple functions each time you want to calculate the mean for a given list of numbers, you can create a UDF that can be called inline in your template as often as you want.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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