It is hard to tell from the screen shots, but I am guessing that you have a nil in your array before the terminating nil.

Take a look at the following code fragment and the output it emits:

[code] NSLog (@“Small primes:”);

NSArray *primes = [NSArray arrayWithObjects:@“2”, @“3”, @“5”, @“7”, @“11”, @“13”, @“17”, @“19”, nil];

for (NSString *prime in primes)

{

NSLog (@“Prime = %@”, prime);

}

```
NSLog (@"Small primes again (there is a nil after 7):");
primes = [NSArray arrayWithObjects:@"2", @"3", @"5", @"7", nil, @"11", @"13", @"17", @"19", nil];
for (NSString *prime in primes)
{
NSLog (@"Prime = %@", prime);
}
```

2012-05-07 15:15:30.820 TripleJ[15657:707] Small primes:

2012-05-07 15:15:30.821 TripleJ[15657:707] Prime = 2

2012-05-07 15:15:30.821 TripleJ[15657:707] Prime = 3

2012-05-07 15:15:30.821 TripleJ[15657:707] Prime = 5

2012-05-07 15:15:30.822 TripleJ[15657:707] Prime = 7

2012-05-07 15:15:30.822 TripleJ[15657:707] Prime = 11

2012-05-07 15:15:30.822 TripleJ[15657:707] Prime = 13

2012-05-07 15:15:30.823 TripleJ[15657:707] Prime = 17

2012-05-07 15:15:30.824 TripleJ[15657:707] Prime = 19

2012-05-07 15:15:30.824 TripleJ[15657:707] Small primes again (there is a nil after 7):

2012-05-07 15:15:30.824 TripleJ[15657:707] Prime = 2

2012-05-07 15:15:30.825 TripleJ[15657:707] Prime = 3

2012-05-07 15:15:30.825 TripleJ[15657:707] Prime = 5

2012-05-07 15:15:30.826 TripleJ[15657:707] Prime = 7

[/code]