Who Would Use a CFCONTINUE Tag?

This isn’t an official survey (or even unofficial one, for that matter), but I’m wondering how many people out there would use a CFCONTINUE tag if there were one available. Personally, I find the ability to continue (to jump to the next item in a loop) very useful, and occasionally my ColdFusion code suffers without it. 90% of the time I easily get by with CFIF tags inside loops, but when there is a great deal of processing going on, and a lot of decisions being made, I’ve found myself having to nest a lot of CFIF tags when a CFCONTINUE tag could have simplified my code. What are your thoughts?

23 Responses to Who Would Use a CFCONTINUE Tag?

  1. Steve says:

    I sent in a feature request to Macromedia or Allaire (can’t remember who) several years back and never heard back from them. This seems like an easy one to me and I would use it all the time if I had it available.

  2. ross says:

    I so wish there was a tag like this – especially if it came with a ‘step through’ interface button. I hate using cfabort or a whole bunch of IF’s. If it were only like Director.

  3. Ryan Guill says:

    That would be a useful feature. I guess this means we cant hope for it in blackstone 🙁

  4. Hendrik kramer says:

    I’d also vote for this tag. I’m wondering why there is no such tag, but a “continue” command for cfscript. So i always try to use cfscript for this thing.

  5. Steve Moore says:

    Most modern programming languages have such a statement to bypass code. Having available in CF would be VERY useful.

  6. Greg says:

    oh oh, oh ohRaises hand a la Horshack

  7. Barneyb says:

    Oh yeah. I’d LOVE for there to be one, especially since there’s already one for CFSCRIPT. It’s not uncommon to write blocks of code in CFSCRIPT (that would be better of as tags) specifically for this functionality, since the CFTRY..CFTHROW..CFCATCH workaround far from elegant.

  8. Ben Forta says:

    Lots of people have asked for this one, and it should indeed be added to the language (and no, it is not in Blackstone).Having said that, in almost 10 years of CF coding, I honestly can’t remember ever needing it.

  9. Alex Hubner says:

    It’s Christmas time!For sure it’s a desirable feature. And not a new request, take a look:http://www.google.com/search?sourceid=navclient&hl=pt-BR&ie=UTF-8&oe=UTF-8&q=CFCONTINUE

  10. I can’t think of where I’d use it but having the option would prove useful to someone.

  11. Stacy Young says:

    Count me in!

  12. Adedeji Olowe says:

    Yeah, we need it, and we need it badly.

  13. Adedeji Olowe says:

    Yeah, we need it, and we need it badly.

  14. I’m with Ben on this one. It sounds useful, and I see a lot of people who are interested… but I’ve never personally thought, “y’know, what I need is ‘cfcontinue’.”

  15. Tomas says:

    Nope…. never came up when I’ve been coding either.

  16. Angelos Constantinou says:

    We need it!! It will save us couple of cfifs 🙂

  17. Scott Mebberson says:

    I always need this tag! Would rock!

  18. Steve Powell says:

    Yep a CONTNUE tag and or a BREAK tag would be very welcome. CONTINUE runs the next LOOP without executing any further code in the current loop. BREAK kills the loop and jumps to the next executable statement. Its a standard part of most programming languages like VB, C, JAVA and so on. Though I must admit I don’t actually miss it much as its easy enough to code using condition flags and I use such things fairly rarely anyway.

  19. Chris Phillips says:

    Official of Unofficial, I vote “yes” for the cfcontinue tag.When you have a very long block of code inside of a cfloop, there are times when you reach a condition and just want to jump to the next iteration of the loop (without having to have use an ungainly/unnecessary “if” solution). I currently use the cftry-cfthrow-cfcatch approach that Barney mentioned. I even considered creating a set of custom tags for this a while back. cf_loop and cf_continue.So, yes please rattle whatever cubicle you need to to get this done. Because I love CF and I NEED cfcontinue.

  20. Gobo says:

    Yes, much needed.

  21. Mike Vierow says:

    cfbreak exists since atleast cf 4.0 (can’t find my 3.1 or 2.0 docs, but you’re probably not running those anyway). As for cfcontinue, it baffles me why there isn’t one yet. Very typical loop control stuff. I’d use it repeatedly.

  22. penis says:

    Three phrases should be among the most common in our daily usage. They are: Thank you, I am grateful and I appreciate.