Re: NSOperationQueue and for-loop
Re: NSOperationQueue and for-loop
- Subject: Re: NSOperationQueue and for-loop
- From: Koen van der Drift <email@hidden>
- Date: Tue, 02 Oct 2012 18:19:00 -0400
On Oct 2, 2012, at 6:07 PM, email@hidden wrote:
> I can't speak to the other examples since I haven't seen them, but the __block specifier is necessary if your block modifies the variable (your block does modify i). Your example also seems a bit strange since your for loop modifies i itself.
Ha, yes you are right, that was a quick copy-paste error. I of course want something like: sum += i ;-)
I didn't know about the part when a block modifies a variable. That makes sense, thanks.
- Koen.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden