<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc = "http://purl.org/dc/elements/1.1/" xmlns="http://purl.org/rss/1.0/">
	<channel rdf:about="http://livedocs.adobe.com/">
	<title>LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-pa9.htm</title>	
		<link>http://livedocs.adobe.com/</link>
		<description>Macromedia LiveDocs - online documentation with user feedback.</description>
		<copyright>Copyright 2009, Macromedia, Inc.</copyright>
		<dc:date>2009-11-26T04:41:00</dc:date>
		<dc:language>en-us</dc:language>
		<items>
			<rdf:Seq>
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa9.htm#39853" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa9.htm#39821" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa9.htm#26786" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa9.htm#22813" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa9.htm#15183" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa9.htm#8413" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa9.htm#8241" />
			</rdf:Seq>
		</items>
	</channel>
	
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa9.htm#39853">
		<title>coldfusion/6.1/htmldocs/tags-pa9.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa9.htm#39853</link>
		<description>I need to update my comment above: a constant expression like #'a'# or even #1+1# does indeed work as a CFCASE VALUE in CFMX (though not CF5). When testing it (before making my last comment), I had a different problem that I misinterpreted.&lt;br /&gt;&lt;br /&gt;Still, I'll hope that my identification here of what a constant expression is may help others. &lt;br /&gt;&lt;br /&gt;That said, I have to say I still don't see why one would ever use one. If any readers ever think of a practical use, I'm sure others would appreciate hearing of it.</description>
		<dc:creator>carehart</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-09-23T08:16:55</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa9.htm#39821">
		<title>coldfusion/6.1/htmldocs/tags-pa9.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa9.htm#39821</link>
		<description>Folks, the docs here suggest that a CFCASE value can be a constant or a &quot;constant expression&quot;. Yet nowhere do I find that term defined in the CFMX 6.1 docs. Some have interpreted it to mean an expression that resolves to a constant (such as #'a'#), but any attempt to refer to pound signs in a CFCASE value gets an error in CFMX 6.1.  What is meant above by constant expression? (I've noticed the CFMX 7 docs have the same issue, and will post this there for those who don't read it here.)</description>
		<dc:creator>carehart</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-09-22T14:11:12</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa9.htm#26786">
		<title>coldfusion/6.1/htmldocs/tags-pa9.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa9.htm#26786</link>
		<description>It appears that &lt;CFCASE&gt; cannot use a component or function scoped variables in it's value expression.  The following code sets throw the same compilation error: This expression must have a constant value.&lt;br /&gt;&lt;br /&gt;&lt;cfcomponent name=&quot;cfcase_test&quot;&gt;&lt;br /&gt;	&lt;cfset this.var1 = &quot;1&quot;&gt;&lt;br /&gt;	&lt;cffunction name=&quot;test_this&quot;&gt;&lt;br /&gt;		&lt;cfswitch expression=&quot;1&quot;&gt;&lt;br /&gt;			&lt;cfcase value=&quot;#this.var1#&quot;&gt;Match!/cfcase&gt;&lt;br /&gt;		&lt;/cfswitch&gt;&lt;br /&gt;	&lt;/cffunction&gt;&lt;br /&gt;&lt;/cfcomponent&gt;&lt;br /&gt;&lt;br /&gt;&lt;cfcomponent name=&quot;cfcase_test&quot;&gt;&lt;br /&gt;&lt;br /&gt;	&lt;cffunction name=&quot;test_this&quot;&gt;&lt;br /&gt;		&lt;cfset var1 = 1 &gt;&lt;br /&gt;		&lt;cfswitch expression=&quot;1&quot;&gt;&lt;br /&gt;			&lt;cfcase value=&quot;#var1#&quot;&gt;Match!&lt;/cfcase&gt;&lt;br /&gt;		&lt;/cfswitch&gt;&lt;br /&gt;	&lt;/cffunction&gt;&lt;br /&gt;&lt;/cfcomponent&gt;&lt;br /&gt;&lt;br /&gt;However, using an if statement, no error is thrown and the function behaves as expected.&lt;br /&gt;&lt;br /&gt;&lt;cfcomponent name=&quot;cfcase_test&quot;&gt;&lt;br /&gt;	&lt;cfset this.var1 = &quot;1&quot;&gt;&lt;br /&gt;	&lt;br /&gt;	&lt;cffunction name=&quot;test_this&quot;&gt;&lt;br /&gt;		&lt;cfif this.var1 eq &quot;1&quot;&gt;Match!&lt;/cfif&gt;&lt;br /&gt;	&lt;/cffunction&gt;&lt;br /&gt;&lt;/cfcomponent&gt;&lt;br /&gt;&lt;br /&gt;I assume this has to do with the way Neo's Assembler/Translation engine compiles the switch statement, requiring the value to be known a the time of compilation rather than runtime as with an if statement??&lt;br /&gt;&lt;br /&gt;--Mike</description>
		<dc:creator>Mike@Jobscience</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-01-20T10:42:51</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa9.htm#22813">
		<title>coldfusion/6.1/htmldocs/tags-pa9.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa9.htm#22813</link>
		<description>I'm trying to test both for &quot;equals&quot; and &quot;greater than&quot; in a cfswitch statement.  It seems to me I should be able to do:&lt;br /&gt;&lt;br /&gt;&lt;cfswitch expression = #redirect.RecordCount#&gt;&lt;br /&gt;				&lt;cfcase value = &quot;0&quot;&gt;&lt;br /&gt;					&lt;!--- Do nothing but show variables.message in the body below ---&gt;&lt;br /&gt;				&lt;/cfcase&gt;&lt;br /&gt;				&lt;cfcase value=&quot;1&quot;&gt;&lt;br /&gt;					&lt;cflocation URL=&quot;#redirect.newurl#&quot; addtoken=&quot;no&quot;&gt;&lt;br /&gt;				&lt;/cfcase&gt;&lt;br /&gt;				&lt;cfcase value GT 1&gt;&lt;br /&gt;					&lt;cfset variables.multiplelinks=true&gt;&lt;br /&gt;					&lt;cfset variables.message=&quot;The page you are looking for may have moved to one of the following addresses:&quot;&gt;&lt;br /&gt;				&lt;/cfcase&gt;&lt;br /&gt;			&lt;cfdefaultcase&gt;&lt;br /&gt;&lt;br /&gt;How come I get the error message &quot;Invalid token &amp;apos;1&amp;apos; found on line 40 at column 50.&quot;?</description>
		<dc:creator>BuckyGoldstein</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2004-10-22T11:12:27</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa9.htm#15183">
		<title>coldfusion/6.1/htmldocs/tags-pa9.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa9.htm#15183</link>
		<description>I'm trying to use cfcase with a variable expression, which the documentation says should work, but it doesnt appear to (indeed, it breaks the error mechanism).   I have:&lt;br /&gt;&lt;br /&gt;	&lt;cfset pendingUser=&quot;foo&quot;&gt;&lt;br /&gt; 	&lt;cfswitch expression=&quot;#getUser.status#&quot;&gt;&lt;br /&gt;	&lt;cfcase value=&quot;#pendingUser#&quot; delimiters=&quot;,&quot;&gt;&lt;br /&gt;                         &lt;cfset foo=&quot;bar&quot;&gt;&lt;br /&gt;	&lt;/cfcase&gt;&lt;br /&gt;&lt;/cfswitch&gt;&lt;br /&gt;&lt;br /&gt;and cold fusion generates an error saying that the expression must be constant, but that it cant determine where the error is.  If I change the &lt;cfcase&gt; to &lt;cfcase value=&quot;foo&quot;&gt;, it works fine.</description>
		<dc:creator>GAlanShepherd</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2004-05-21T11:50:38</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa9.htm#8413">
		<title>coldfusion/6.1/htmldocs/tags-pa9.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa9.htm#8413</link>
		<description>This is a known issue in ColdFusion MX 6.1 (bug number 53339).</description>
		<dc:creator>halL</dc:creator>
		<dc:type>1 1</dc:type>
		<dc:date>2004-02-18T13:19:23</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa9.htm#8241">
		<title>coldfusion/6.1/htmldocs/tags-pa9.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa9.htm#8241</link>
		<description>&lt;cfbreak&gt; now also works in conjunction with a &lt;cfswitch&gt;. This is really screwy and isn't backwards compatible with cf5. Run this on a cf5 and a cfmx machine and you'll see what I mean:&lt;br /&gt;&lt;br /&gt;&lt;cfloop from=&quot;1&quot; to=&quot;5&quot; index=&quot;count&quot;&gt;&lt;br /&gt;	&lt;cfoutput&gt;#count#&lt;br&gt;&lt;/cfoutput&gt;&lt;br /&gt;	&lt;cfswitch expression=&quot;#count#&quot;&gt;&lt;br /&gt;		&lt;cfcase value=&quot;3&quot;&gt;&lt;cfbreak&gt;&lt;/cfcase&gt;&lt;br /&gt;	&lt;/cfswitch&gt;&lt;br /&gt;	&lt;cfif count is 4&gt;&lt;cfbreak&gt;&lt;/cfif&gt;&lt;br /&gt;&lt;/cfloop&gt;&lt;br /&gt;&lt;br /&gt;on cf5 it displays: 1 2 3&lt;br /&gt;&lt;br /&gt;on cfmx it displays 1 2 3 4</description>
		<dc:creator>Steve</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2004-02-17T08:23:50</dc:date>
	</item>
	</rdf:RDF>

