>Is it possible to place CFIF statements inside a CFCASE?  When I do this, I
>get an error that I can't have a CFCASE after a CFDEFAULTCASE, even though
>there are no CFDEFAULTCASE statements in the code.  Removing this CFIF
>statement makes everything work ...
>

I just ran this test code on both 4.5 and MX to see and it works fine for 
me:

<cfset variables.foo = "test">
<cfset variables.bar = "anotherTest">

<cfswitch expression="#variables.foo#">
  <cfcase value="notest">
    <cfif NOT Compare(variables.bar, "anotherTest")>
      It worked!!
    <cfelse>
      No Dice.
    </cfif>
  </cfcase>

  <cfcase value="test">
    <cfif NOT Compare(variables.bar, "yetAnotherTest")>
      It worked!!
    <cfelse>
      No Dice.
    </cfif>
  </cfcase>

  <cfdefaultcase>
    No match.
  </cfdefaultcase>
</cfswitch>

Maybe posting your code might help?

Regards,
Dave.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to