when to use a "goto"

This is a discussion on when to use a "goto" within the C Programming forums, part of the General Programming Boards category; Ok C gurus... all my books say avoid goto statements. So why do they appear by the thousands in glibc ...

  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    1

    when to use a "goto"

    Ok C gurus... all my books say avoid goto statements. So why do they appear by the thousands in glibc functions? The linux kernel had almost 30,000 of them! What is the correct situation to use a goto?

    Thanks in advance,
    Daniel


    PS
    I have no intention of using a goto, I just found it odd that they were used so often.

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Search the forum. This is a common topic.

    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. "goto" question
    By Kylecito in forum C++ Programming
    Replies: 29
    Last Post: 02-15-2006, 04:46 AM
  2. I know everyone hates "GOTO" but...
    By anderson in forum C++ Programming
    Replies: 15
    Last Post: 02-13-2006, 09:08 AM
  3. "goto", is it a taboo?
    By Unregistered in forum C Programming
    Replies: 17
    Last Post: 05-29-2002, 09:59 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21