• 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
Block syntax failure
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Block syntax failure


  • Subject: Block syntax failure
  • From: Charlie Dickman <email@hidden>
  • Date: Fri, 1 Jan 2010 21:34:30 -0500

I have placed the following code taken from an example in a tech note on the develop.apple.com site

float (^distanceTraveled) (float, float, float) =
                          ^(float startingSpeed, float acceleration, float time) {
 
    float distance = (startingSpeed * time) + (0.5 * acceleration * time * time);
    return distance;
};

which results in the following error when compiled

expected identifier or '(' before '^' token

What's up? It's Apple's sample code. Is there a setting I'm missing to allow this syntax?

Charlie Dickman
email@hidden



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Block syntax failure
      • From: Seth Willits <email@hidden>
  • Prev by Date: Re: The launch image is not visible on the iPhone device
  • Next by Date: Re: Block syntax failure
  • Previous by thread: Re: The launch image is not visible on the iPhone device
  • Next by thread: Re: Block syntax failure
  • Index(es):
    • Date
    • Thread