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

cfswitch

Explorer ,
Apr 11, 2013 Apr 11, 2013

Copy link to clipboard

Copied

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

Views

355

Translate

Translate

Report

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

Copy link to clipboard

Copied

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".

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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
Documentation