• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Blocks with return type
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Blocks with return type


  • Subject: Re: Blocks with return type
  • From: Kyle Sluder <email@hidden>
  • Date: Sat, 29 Sep 2012 20:55:56 -0700

On Sep 29, 2012, at 8:40 PM, Quincey Morris <email@hidden> wrote:

> On Sep 29, 2012, at 19:41 , "Gerriet M. Denkmann" <email@hidden> wrote:
>
>> LongBlock_t aBlock =     <...some magic here...> { (void)a; unsigned long x = 5; return x;};
>>
>> What should <...some magic here...> look like?
>
> LongBlock_t aBlock =    ^ unsigned long (id a) {...};

I wasn't aware this was accepted syntax. I was under the impression that you either had to explicitly case the return value or explicitly cast the block literal.

--Kyle Sluder
_______________________________________________

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

  • Follow-Ups:
    • Re: Blocks with return type
      • From: Quincey Morris <email@hidden>
References: 
 >Blocks with return type (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Blocks with return type (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Blocks with return type
  • Next by Date: Re: Blocks with return type
  • Previous by thread: Re: Blocks with return type
  • Next by thread: Re: Blocks with return type
  • Index(es):
    • Date
    • Thread