| Contents > Developing ColdFusion MX Applications > Using Expressions and Pound Signs > Using pound signs |
|
|
|
|
||
Pound signs (#) have a special meaning in CFML. When the ColdFusion server encounters pound signs in CFML text, such as the text in a cfoutput tag body, it checks to see if the text between the pound signs is either a variable or a function.
Is so, it replaces the text and surrounding pound signs with the variable value or the result of the function. Otherwise, ColdFusion generates an error.
For example, to output the current value of a variable named Form.MyFormVariable, you delimit (surround) the variable name with pound signs:
<cfoutput>Value is #Form.MyFormVariable#</cfoutput>
In this example, the variable Form.MyFormVariable is replaced with the value assigned to it.
Follow these guidelines when using pound signs:
1 + 2 in pound signs.The following sections provide more details on how to use pound signs in CFML. For a description of using pound signs to create variable names, see Using pound signs to construct a variable name in assignments
|
|
||
| Contents > Developing ColdFusion MX Applications > Using Expressions and Pound Signs > Using pound signs |
|
|
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.
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/exprea13.htm
Comments
JeffHouser said on Jan 15, 2004 at 2:43 PM :