• 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
break, continue, goto
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

break, continue, goto


  • Subject: break, continue, goto
  • From: David Thorp <email@hidden>
  • Date: Mon, 4 Aug 2003 19:18:45 +1000

Greetings all...

I'm moving through my learning here. I'm up to loops and conditional statements.

In my (limited) programming experience (with such things as basic and pascal many years ago) I learned that spaghetti code is bad and thus getting out of loops and conditional statements using things like continue and break (except for the switch statement) and using goto at any time, are all examples of bad programming, where one should carefully choose one's exit conditions and conditional statements very carefully instead.

Do any of you have any comments on these things? Is what I said just there pretty much correct? Should I ever use the goto command, and if so when? What about when is good to use break and continue and when is not?

Any advice would be welcome. Thanks in advance!

David.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: break, continue, goto
      • From: "M. Uli Kusterer" <email@hidden>
    • Re: break, continue, goto
      • From: Stephan Lichtenauer <email@hidden>
  • Prev by Date: NSTextView, resignFirstResponder and textShouldEndEditing
  • Next by Date: format specifiers
  • Previous by thread: NSTextView, resignFirstResponder and textShouldEndEditing
  • Next by thread: Re: break, continue, goto
  • Index(es):
    • Date
    • Thread