Using number signs in expressions

Use number signs in expressions only when necessary, because unneeded number signs reduce clarity and can increase processing time. The following example shows the preferred method for referencing variables:

<cfset SomeVar = Var1 + Max(Var2, 10 * Var3) + Var4>

In contrast, the following example uses number signs unnecessarily and is less efficient than the previous statement:

<cfset #SomeVar# = #Var1# + #Max(Var2, 10 * Var3)# + #Var4#>

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

Version 7

 

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

Current page: http://livedocs.adobe.com/coldfusion/7/htmldocs/00000937.htm