View comments | RSS feed
Contents > Developing ColdFusion MX Applications > Using ColdFusion Variables > Creating variables > Variable naming rules PreviousNext

Variable naming rules

ColdFusion variable names, including form field names and custom function and ColdFusion component argument names, must conform to Java naming rules and the following guidelines:

The following rule applies to variable names, but does not apply to form field and argument names:

Note: In some cases, when you use an existing variable name, you must enclose it with pound signs (#) to allow ColdFusion to distinguish it from string or HTML text, and to insert its value, as opposed to its name. For more information, see Using pound signs.


Contents > Developing ColdFusion MX Applications > Using ColdFusion Variables > Creating variables > Variable naming rules PreviousNext

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.

Comments


Jedi Master said on Feb 29, 2004 at 6:49 PM :
"A query result is a type of variable, so it cannot have the same name as another local variable in the current ColdFusion application page."

This is not true. You can give a query the same name as an existing variable, however it just overwrites the variable.
toniu27 said on Jun 29, 2004 at 10:03 AM :
"A variable name must begin with a letter, underscore, or Unicode currency symbol"

But why Form.1 works fine?
DracTK said on Jun 15, 2005 at 8:06 PM :
url.1 and form.1 work b/c CF want to be able to work with outside sources of data that may have different variable naming conventions.

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/variabl3.htm