ColdFusion can be a fun and dreadful language. There are a number of pros and cons to using it, the biggest con being that hardly anyone uses it. It is, however, extremely responsive. There comes a time, however, when I want to bang my head on my desk because of how a feature is built, or more importantly, what it lacks. A continue option is one such feature.

I am in the process of upgrading BuyFromAChristian.com, applying a fresh new look to the outdated design it has had. I am having a lot of fun with this upgrade, adding things like CSS3 features rather than having to blow time by creating and possibly recreating graphics for things such as shadows and rounded corners. I could opt for a simpler solution using JavaScript, but truth be told, I rather let the browser do its thing without having to add anymore load to the GUI than is necessary. The amount of content that uses rounded corners is minimal, but I am a purest and while I understand that CSS3 is not finalized nor widely supported, it is the future. I am perfectly content having the site look slightly different in Internet Explorer 6, 7 and 8. I may end up using a rounded corners script exclusively for IE6, 7 and 8, but that will be decided later. This, however, is a rant against ColdFusion, so my glee ends here.

ColdFusion's cfloop can be a versatile tag that lacks features. I know that seems like a paradox, but it is true depending on the case. Long story short, I needed the equivalent to a continue next step, and became annoyed when I found out that ColdFusion has no such feature. Refusing to do ugly conditionals, I found a solution that works. It is not the best solution (because the best would be having a cfcontinue tag!), but it is likely the best alternative. Note that I was not looking for a break, which CF has in the form of cfbreak. At least the ability to break from a loop is present.

<!--- Skip 5 --->
<cfloop index="i" from="1" to="10">
    <cftry>
        <cfif i EQ 5>
            <cfthrow type="continue" />
        </cfif>
        Listing #i#<br />
        <cfbreak type="continue"></cfbreak>
    </cftry>
</cfloop>