Railo
  1. Railo
  2. RAILO-2179

add support for labels to break/continue

    Details

    • Type: Feature Request Feature Request
    • Status: Resolved (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 4.1.0.000
    • Labels:
      None
    • Similar Issues:
      Show 10 results 

      Description

      Examples:
      <!--- tag:loop/tag:break --->
      <cfset res="">
      <cfloop from="1" to="2" index="i" label="susi">
      <cfloop from="1" to="2" index="y">
      <cfset res=listAppend(res,"#i#:#y#")><cfbreak "susi">
      </cfloop>
      </cfloop>
      <cf_valueEquals left="#res#" right="1:1">

      <!--- script:while/script:continue --->
      <cfscript>
      res="";
      i=0;
      outer:while(++i < 3){
      res=listAppend(res,"is:#i#:#y#");
      y=0;
      while(++y<3)

      { res=listAppend(res,"ys:#i#:#y#"); continue outer; res=listAppend(res,"ye:#i#:#y#"); }

      res=listAppend(res,"ie:#i#:#y#");
      }
      valueEquals(res,"is:1:1,ys:1:1,is:2:1,ys:2:1");
      </cfscript>

        Gliffy Diagrams

          Activity

          Hide
          Michael Offner added a comment -

          testcase attached

          Show
          Michael Offner added a comment - testcase attached
          Show
          Michael Offner added a comment - https://github.com/getrailo/railo/commit/6f2f348e65300bcc2055aaa70cefb59607e3c26c

            People

            • Assignee:
              Michael Offner
              Reporter:
              Michael Offner
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development