As others already noted the standard way is using the continue keyword.
However, if the conditional inside is scoped high enough, you can also just use
a guard if () {}
Putting everything inside the if block.
Then like any guard it's going to do nothing if the condition is false.
Most Objectiv
On May 14, 2015, at 11:52 AM, William Squires wrote:
>
> Oh well, "continue" it is. Though you can still do it manually, if you want!
> :)
While that’s true, fast enumeration performs better.
Charles
___
Cocoa-dev mailing list (Cocoa-dev@lists.appl
Oh well, "continue" it is. Though you can still do it manually, if you want! :)
On May 14, 2015, at 11:15 AM, William Squires wrote:
> Not as far as I know; this is one of those times when you're better off doing
> a manual loop with a regular for( ; ; ) {} statement; then you can test the
> l
Just tested Mike's suggestion and "continue" does the trick.
Here's a test that verifies that..
NSArray *myStuff = [[NSArray alloc]initWithObjects:@"A", @"B", @"Puppies",
@"C",@"D", nil];
for (NSString *myThing in myStuff) {
if ([myThing isEqualToString:@"Puppies"]) {
'continue’
Just like other c loop constructs.
> On 15 May 2015, at 12:09 am, Alex Zavatone wrote:
>
> I'm sure this will sound like the noobiest question ever, but with Fast
> Enumeration, if in an if statement within the loop, is there a way to stop
> loop execution and essentially do a "
Not as far as I know; this is one of those times when you're better off doing a
manual loop with a regular for( ; ; ) {} statement; then you can test the loop
iterator with a switch() and take appropriate action (or none at all, if
desired.)
On May 14, 2015, at 11:09 AM, Alex Zavatone wrote:
You want:
continue;
Same as a regular for loop in C.
> On 14 May 2015, at 18:09, Alex Zavatone wrote:
>
> I'm sure this will sound like the noobiest question ever, but with Fast
> Enumeration, if in an if statement within the loop, is there a way to stop
> loop execution and essentially do a