CFML custom tags
When you write a custom tag in CFML, you can take advantage of all the features of the
ColdFusion language, including all built-in tags and even other custom tags. CFML custom tags
can include body sections and end tags. Because they are written in CFML, you do not need to
know a programming language such as Java. CFML custom tags provide more capabilities than
user-defined functions, but are less efficient.
For more information on CFML custom tags, see
CFML Tags," on page
ColdFusion code, including CFML custom tags, user-defined functions, and CFX tags, see
Chapter 8, "Reusing Code in ColdFusion Pages," on page
CFX Tags
CFX tags are ColdFusion custom tags that you write in a programming language such as Java or
C++. These tags can take full advantage of all the tools and resources provided by these languages,
including their access to runtime environments. CFX tags also generally execute faster than
CFML custom tags because they are compiled. CFX tags can be cross-platform, but are often
platform-specific, for example if they take advantage of COM objects or the Windows API.
For more information on CFX tags, see
on page
251.
Functions
Functions typically manipulate data and return a result. CFML includes over 250 built-in
functions. You can also use CFScript to create user-defined functions (UDFs), sometimes referred
to as custom functions.
Functions have the following general form:
functionName([argument1[, argument2]]...)
Some functions, such as the
more comma-separated arguments and can have additional optional arguments. All ColdFusion
functions return a value. For example,
Built-in functions
ColdFusion built-in functions perform a variety of tasks, including, but not limited to, the
following:
•
Creating and manipulating complex data variables, such as arrays, lists, and structures
•
Creating and manipulating queries
•
Creating, analyzing, manipulating, and formatting strings and date and time values
•
Evaluating the values of dynamic data
•
Determining the type of a variable value
•
Converting data between formats
•
Performing mathematical operations
•
Getting system information and resources
For alphabetical and categorized lists of ColdFusion functions, see
Functions,"
in CFML Reference.
42
Chapter 2: Elements of CFML
173. For information about, and comparisons among, ways to reuse
Chapter 12, "Building Custom CFXAPI Tags,"
function take no arguments. Other functions require one or
Now
Round(3.14159)
Chapter 9, "Creating and Using Custom
163.
returns the value 3.
Chapter 3, "ColdFusion
Need help?
Do you have a question about the COLDFUSION MX 61-DEVELOPING COLDFUSION MX and is the answer not in the manual?
Questions and answers