User Guide

Table Of Contents
Reserved words 39
Character case
ColdFusion is case-insensitive. For example, the following all represent the cfset tag: cfset,
CFSET, CFSet, and even cfsEt. However, you should get in the habit of consistently using the
same case rules in your programs; for example:
Develop consistent rules for case use, and stick to them. If you use lowercase characters for
some tag names, use them for all tag names.
Always use the same case for a variable. For example, do not use both myvariable and
MyVariable to represent the same variable on a page.
Follow these rules to prevent errors on application pages where you use both CFML and case-
sensitive languages, such as JavaScript.
Special characters
The double-quotation marks ("), single-quotation mark ('), and number sign (#) characters have
special meaning to ColdFusion. To include any of them in a string, double the character; for
example, use ## to represent a single # character.
The need to escape the single- and double-quotation marks is context-sensitive. Inside a double-
quoted string, you do not need to escape single-quotation mark (apostrophe) characters. Inside a
single-quoted string, you do not escape double-quotation mark characters.
The following example illustrates escaping special characters, including the use of mixed single-
and double-quotation marks:
<cfset mystring = "We all said ""For He's a jolly good fellow.""">
<cfset mystring2 = 'Then we said "For She''s a jolly good fellow".'>
<cfoutput>
#mystring#<br>
#mystring2#<br>
Here is a number sign: ##
</cfoutput>
The output looks like this:
We all said "For He's a jolly good fellow."
Then we said "For She's a jolly good fellow."
Here is a number sign: #
Reserved words
As with any programming tool, you cannot use just any word or name for ColdFusion variables,
UDFs and custom tags. You must avoid using any name that can be confused with a ColdFusion
element. In some cases, if you use a word that ColdFusion uses—for example, a built-in structure
name—you can overwrite the ColdFusion data.
The following list indicates words you must not use for ColdFusion variables, user-defined
function names, or custom tag names. While some of these words can be used safely in some
situations, you can prevent errors by avoiding them entirely. For a complete list of reserved words,
see CFML Reference.