View comments | RSS feed

Rules for embedding comments in CFML code

New in ColdFusion MX: You can embed a CFML comment within the following ColdFusion elements:

ColdFusion ignores the comment. (In earlier releases, comments within these constructs were not allowed.)

The following examples show valid embedded CFML comments:

<cfif true eq true <!--- comment --->>
<cfoutput>myVar: #myVar<!--- comment within pound signs--->#</cfoutput>
#IncrementValue(120<!--- comment next to argument--->)#
<cf__comment_pos_05 <!--- comment within custom-tag brackets --->>
<cfset foo = evaluate("1 + 2<!--- comment --->")> 
isDefined(dynamicVariable<!--- comment --->)
#isDefined<!--- comment --->("MyConstruct")#
<cfset myLVar<!--- comment ---> = "myLVar&lt;!--- comment ---&gt;">

The following examples show invalid or erroneous embedded CFML comments:

isDefined("myVariable<!--- no comment within name string --->") 
is<!--- no comment within function name --->Defined("myVariable") 
<cfout<!--- no comment within tag name --->put "#myVariable#"> 

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

Version 6

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

Comments


No screen name said on Aug 14, 2003 at 4:54 AM :
Just a remider CF get's real upset if by carelessness you have an unbalanced comment eg <!--- unbalance -->

 

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

Current page: http://livedocs.adobe.com/coldfusion/6/CFML_Reference/Tags-pt05.htm