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

Summary

The ability to create user-defined functions is an important part of any programming language, and CFML provides two ways to create UDFs. Tag-based UDFs are more powerful than <cfscript>-based UDFs, and they do more of the work for you by, for example, simplifying data validation. <cfscript>-based UDFs are advantageous when porting function code between languages. UDFs may process required and optional arguments, may be stored in scopes, and may even be passed as parameters to other functions.

Sample Questions

1:Which of the following arrays contains information passed into a UDF?
  1. Attributes

  2. Arguments

  3. Parameters

  4. Var

2:Which of the following keywords creates protected variables within a UDF?
  1. var

  2. set

  3. return

  4. variable

3:What are the advantages of tag-based UDFs over <cfscript>-based UDFs? (select two)
  1. Execution speed

  2. Automatic argument and type checking

  3. Ability to be used as tag attributes

  4. Ability to access any CFML language elements

  5. Ability to be passed as a parameter to another UDF


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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