User-Defined Functions

Team-Fly    

ColdFusion® MX: From Static to Dynamic in 10 Steps
By Barry Moore
Table of Contents
The Next Step: Advanced ColdFusion Functionality


Similar to the way in which you use custom tags, you can also create custom functions. If there is a particular function that you need to perform repeatedly and you cannot find that function in ColdFusion's 250+ built-in functions, you can create your own user-defined function.

User-defined functions (UDFs) are similar to custom tags, except they are created using ColdFusion Script. UDF code can be in the template itself or included using <CFINCLUDE> or the Application.cfm file. Like custom tags, developers also create and share UDFs. You can find many open-source functions at the www.cflib.org web site. This web site is shown in Figure 5.

Figure 5. The Common Function Library Project web site.

graphics/apafig05.gif


    Team-Fly    
    Top
     



    ColdFusion MX. From Static to Dynamic in 10 Steps
    ColdFusion MX: From Static to Dynamic in 10 Steps
    ISBN: 0735712964
    EAN: 2147483647
    Year: 2002
    Pages: 140
    Authors: Barry Moore

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net