• 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: NSUInteger in for-loop?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSUInteger in for-loop?


  • Subject: Re: NSUInteger in for-loop?
  • From: "Sean McBride" <email@hidden>
  • Date: Mon, 15 Sep 2008 14:24:20 -0400
  • Organization: Rogue Research

On 9/15/08 12:17 PM, Nathan Kinsinger said:

>> Well, to each his own.  I find it is a worthwhile tradeoff.  For
>> action
>> methods, just do:
>>
>> - (IBAction)handleButton:(id)sender
>> {
>>    (void)sender;
>>
>>    ...
>> }
>
>There is also "#pragma unused", it's kind of ugly but is specific
>about the parameter usage. Someone won't be looking through a long
>method trying to find where notification is used if they see this:
>
>- (void)applicationDidFinishLaunching:(NSNotification *)notification
>{
>#pragma unused (notification)
>
>	// ... other stuff
>
>}

True.  There was a list discussion long ago (I think on carbon dev)
about the most portable way to do this, and '(void)param' was the
winner.  Found it:

<http://lists.apple.com/archives/carbon-dev/2005/Dec/msg00402.html>

'#pragma unused' will cause some compilers to warn "unknown pragma".
Though, since this is the Cocoa list, and Cocoa is not really portable,
I guess it doesn't matter.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

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: NSUInteger in for-loop?
      • From: Quincey Morris <email@hidden>
References: 
 >NSUInteger in for-loop? (From: Alex Reynolds <email@hidden>)
 >Re: NSUInteger in for-loop? (From: Brett Powley <email@hidden>)
 >Re: NSUInteger in for-loop? (From: "Sean McBride" <email@hidden>)
 >Re: NSUInteger in for-loop? (From: Charles Srstka <email@hidden>)
 >Re: NSUInteger in for-loop? (From: "Sean McBride" <email@hidden>)
 >Re: NSUInteger in for-loop? (From: Nathan Kinsinger <email@hidden>)

  • Prev by Date: Re: NSUInteger in for-loop?
  • Next by Date: Re: Strange property behavior
  • Previous by thread: Re: NSUInteger in for-loop?
  • Next by thread: Re: NSUInteger in for-loop?
  • Index(es):
    • Date
    • Thread