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

UDF Positioning

Every ColdFusion developer is familiar with the use of functions. We use them regularly to do things like changing the case of a string with LCase() or UCase() and performing regular expression replacements with REReplace().

ColdFusion 5 introduced UDFs to CFML. A UDF is simply a piece of CFScript that establishes a function that doesn’t exist in the collection of ColdFusion functions. The new function can then be used within other CFScript blocks. This is a powerful extension to ColdFusion, but it’s not without its pitfalls. We can create a proper UDF only to get an error when we try to use it. To make successful use of UDFs, we need to understand how to make them available to our code.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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