simple way of continuing out of outter loop

Tech-Archive recommends: Speed Up your PC by fixing your registry



Say I have two nested foreach loops, is there any simple way of continuing
out of the outter most loop depending on what happens in the inner most?

e.g.,

foreach(int i in I)
{
foreach(int j in J)
if (j == 3)
break.continue;
}

where break.continue means break out of inner loop and continue in outter
loop.

I doubt such a thing exists but just curious

Thanks,
Jon



.



Relevant Pages

  • Re: Why does this not print the filenames ?
    ... when you have an outer and an inner loop, you need to be specific in ... in two loops, I usually needed to refer to both loop variables. ... But foreach loops have a special rule. ...
    (comp.lang.perl.misc)
  • Re: simple way of continuing out of outter loop
    ... where break.continue means break out of inner loop and continue in outter ... I was trying to avoid the bool flag. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Declaring local variables inside loop
    ... 'test' declared inside the loop runs about .7% faster, ... GC load stabilises and the JIT is warmed up, I repeatably get that declaring ... The first column is the 'inner' time, ... Outer mean: 4708 ...
    (comp.lang.java.programmer)
  • accelerating probesetvalues.m by removing the loop for inner = 1:NumPairs
    ... The function probesetvalues.m runs a loop ... for inner = 1:NumPairs ... PMX = thePairs; ... MMX = thePairs; ...
    (comp.soft-sys.matlab)
  • Re: Difficulty with Relatively Simple IF Structure
    ... serious misinterpretations of what the nested IF supposed to do: ... If the condition is TRUE in the outermost IF, then exit the nested ... and continue for the next "i" of the DO loop. ... You need GO TO 11 once you enter either branch of the inner IF. ...
    (comp.lang.fortran)