• 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
Can switch be used here?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can switch be used here?


  • Subject: Can switch be used here?
  • From: Brad Bumgarner <email@hidden>
  • Date: Mon, 24 Jul 2006 11:13:21 -0600

I have NSMutableSets f & l, each containing a variable number of items, including a possible none, and I want to do something based on which is larger, can I set this up using a switch statement? Something like (sudo code):

switch (result)
{
	case f = 0:
		do something;
		break;
	case l = 0:
		do something;
		break;
	case f > l:
		do something;
		break;
	case f == l:
		do something;
		break;
	case f < l:
		do something;
		break;
}

Or can I only accomplish this using if...then...else structures?

Thanks,
Brad Bumgarner, CTA
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Can switch be used here?
      • From: Chas Spillar <email@hidden>
  • Prev by Date: Re: -stringValue on NSTextfield does not reflect actual contents [SOLVED]
  • Next by Date: NSStepper doesn't work with NSDecimalNumber (but everything else does)
  • Previous by thread: Re: -stringValue on NSTextfield does not reflect actual contents [SOLVED]
  • Next by thread: Re: Can switch be used here?
  • Index(es):
    • Date
    • Thread