Actually, I read this again.

OP posted: "This would seem to imply that a __block variable *can* be a *fixed* 
length
array. But when I try to write into such an array inside a block, I get a
compile error, "cannot access __block variable of array type inside block."

In the example I listed below, I have a __block variable inside a block that is 
fixed length array and I can access it via  NSLog(@"char %c", array1[0]);

Please post the example you are having problems with.

Thanks,
-Tony

On Jun 26, 2010, at 8:16 PM, Bill Bumgarner wrote:

> 
> On Jun 26, 2010, at 7:48 PM, Tony Romano wrote:
> 
>> hmmm.  Your saying this doesn't work?
>> 
>>              NSBlockOperation * foo = [NSBlockOperation 
>> blockOperationWithBlock:^{
>>                      __block char array1[5];
>> 
>>                      array1[0] = 'T';
>>              }];
>> 
>> 
>> It works fine for me.  Are you saying something different?
> 
> No -- that works fine.  That is a different expression than the one OP posted.
> 
> b.bum

-Tony

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to