Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

cfswitch

Explorer ,
Apr 11, 2013 Apr 11, 2013

This question was posted in response to the following article: http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7fe5.html

432
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 11, 2013 Apr 11, 2013

I am not sure that the issue described under the History ColdFusion 8 section is accurate. I still get the context validation error when defining <cfcase value="10"> and <cfcase value="010">. Furthermore, the <cfswitch> is evaluating the value of "010" as equal to "10".

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 11, 2013 Apr 11, 2013
LATEST

The situation exactly as described in the notes has been solved. However CF still converts strings to numbers in situations as per Miguel's observation.

Just leave them as bloody strings until there's a REASON to treat them as a number. And, what's more "010" is NOT a number, and should never be treated as one.

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources