Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.