Thread: Goto Command

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    I noticed that everyone says "Don't use Gotos!" but why? Why are they bad?!?!

  2. #2
    He's trying.
    Join Date
    Apr 2005
    Location
    Missouri, US
    Posts
    70
    Quote Originally Posted by Cool-August
    I noticed that everyone says "Don't use Gotos!" but why? Why are they bad?!?!
    GOTOs jump around in your code, are confusing to deal with, and when you need to change something it can be very difficult.

    Functions are better because they can use parameters, return specific values (side effects are usu. intentional & obvious), and use local variables.


    Plus they just keep your code all in one spot and better structured.
    Right?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 26
    Last Post: 07-05-2010, 10:43 AM
  2. temperature sensors
    By danko in forum C Programming
    Replies: 22
    Last Post: 07-10-2007, 07:26 PM
  3. goto command
    By jhwebster1 in forum C Programming
    Replies: 3
    Last Post: 02-21-2006, 12:32 PM
  4. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 03:30 PM
  5. helpppp
    By The Brain in forum C Programming
    Replies: 1
    Last Post: 07-27-2005, 07:05 PM