Description

Used within a cfloop tag. Returns processing to the top of a loop.

Category

Flow-control tags

Syntax

<cfcontinue>

See also

cfabortcfbreakcfexecutecfifcflocationcfloopcfthrowcftry;  cfloop and cfbreak in the Developing ColdFusion Applications

History

ColdFusion 9: Added the tag.

Tag example

<cfloop index="i" from="1" to="5">
<cfoutput>#i#</cfoutput> is
<cfif i mod 2>
ODD<br>
<cfcontinue>
</cfif>
EVEN<br>
</cfloop>

Script example

for (i=1; i <= 5; i++){
writeOutput("#i# is ");
if (i mod 2){
writeOutput("ODD<br>");
continue;
}
writeOutput("EVEN<br>");
}

Either version of the code above outputs:

1 is ODD
2 is EVEN
3 is ODD
4 is EVEN
5 is ODD

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy