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

CFelseif question

Explorer ,
Dec 21, 2012 Dec 21, 2012

Hi,

I have code the works in one environment, but the exact same code does not work in another environment.

Both environments reside on the same server with Cold Fusion 9 Enterprise.

The code contains:

<CFIF   >

     <CFelseif   >

     <cfelse    >

</CFIF >

There are 5 nested CFelseif's within the <CFIF  > </CFIF>. Also, there are 3 sets <CFIF  >  </CFIF> of code 5 nested CFelseifs.

When I seperated the code into seperate <CFIF  >    </CFIF>, the code works in the environment where the CFelseif does not work.

Is there some limit of CFelseif? Or is there a patch that needs to be installed?

Mike

696
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 ,
Dec 21, 2012 Dec 21, 2012

Mike: respectfully, please read my blog article regarding "how to ask for help" (http://adamcameroncoldfusion.blogspot.co.uk/2012/12/need-help-know-how-to-ask-for-it.html), and consider revising your question.

In short, no there is no limitation in CFML in this area. The problem will be with your code. We cannot offer any assistance beyond that whilst your question is so vague.

Cheers.

--

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
Community Expert ,
Dec 22, 2012 Dec 22, 2012
LATEST

userCold9 wrote:

There are 5 nested CFelseif's within the <CFIF  > </CFIF>. Also, there are 3 sets <CFIF  >  </CFIF> of code 5 nested CFelseifs.

When I seperated the code into seperate <CFIF  >    </CFIF>, the code works in the environment where the CFelseif does not work.

That is one you cannot blame on ColdFusion. Nested if-statements, like nested goto-statements, are notorious for increasing the logical complexity of your code.

You should show us the code. If you can't, then at least show us the structure of the <cfif><cfelseif><cfelse> nesting. Also say what you expected and where you think it goes wrong.

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