• 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: inference of block return type
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inference of block return type


  • Subject: Re: inference of block return type
  • From: Dave DeLong <email@hidden>
  • Date: Mon, 28 Jun 2010 16:20:57 -0600

Except that the Short Practical Guide to Blocks you linked to uses:

<return type> ^ (<arg-list>) { <code> };

With the example of:

int (^Multiply)(int, int) = ^(int num1, int num2) {
    return num1 * num2;
};
int result = Multiply(7, 4);

In addition, Session #406 at WWDC 2009 put forth block syntax in the same format (~3:00 on the video), and Blaine made sure to point out that it was essentially just a function pointer, but with a ^ instead of a *.

Dave

On Jun 28, 2010, at 4:12 PM, Bill Bumgarner wrote:

> the syntax full syntax is as I posted:
>
> ^<return-type>  (<arg-list>) {<code>};

<snip>

> http://developer.apple.com/iphone/library/featuredarticles/Short_Practical_Guide_Blocks/

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: inference of block return type
      • From: Bill Bumgarner <email@hidden>
References: 
 >inference of block return type (From: Matt Neuburg <email@hidden>)
 >Re: inference of block return type (From: Tony Romano <email@hidden>)
 >Re: inference of block return type (From: Michael Ash <email@hidden>)
 >Re: inference of block return type (From: Bill Bumgarner <email@hidden>)
 >Re: inference of block return type (From: Michael Ash <email@hidden>)
 >Re: inference of block return type (From: Tony Romano <email@hidden>)
 >Re: inference of block return type (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: using UTF-32 in NSString.
  • Next by Date: Re: inference of block return type
  • Previous by thread: Re: inference of block return type
  • Next by thread: Re: inference of block return type
  • Index(es):
    • Date
    • Thread