CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

View Poll Results: How often have you used 'goto' in the last 5 years?

Voters
111. You may not vote on this poll
  • I use goto regularly.

    3 2.70%
  • I use goto occasionally.

    8 7.21%
  • I've used goto VERY occasionally.

    34 30.63%
  • I've never used goto at all.

    66 59.46%
Page 7 of 9 FirstFirst ... 456789 LastLast
Results 91 to 105 of 122
  1. #91
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,835

    Re: The grand 'goto' poll

    Hey...! I was pleasantly surprised when it came back

    More discussion neede !!
    "A problem well stated is a problem half solved.” - Charles F. Kettering

  2. #92
    Join Date
    Apr 2000
    Location
    Frederick, Maryland
    Posts
    507

    Re: The grand 'goto' poll

    When I was student, my C language teacher told us, no matter how good project we made, if we used goto even once, he wouldnt accept our project. In addition, he didn’t teach us the functionality of goto to make us goto-free programmer. I can safely say that I never use goto in my any C or C++ program and I never needed to do it.

    The only use of goto, which I can recall, is in MS-COBOL and GWBasic languages, but at that time I didn’t know about structured or even object oriented programming. Oh yes, still using it in assembly language programming.

  3. #93
    Join Date
    Sep 2002
    Location
    14° 39'19.65"N / 121° 1'44.34"E
    Posts
    9,815

    Re: The grand 'goto' poll

    Quote Originally Posted by Zeeshan
    When I was student, my C language teacher told us, no matter how good project we made, if we used goto even once, he wouldnt accept our project.
    That's another typical example of the hysterical anti-goto dogmatism mentioned above...

  4. #94
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125

    Re: The grand 'goto' poll

    Wondering why this type of debate is not seen regarding the elusive "ComeFrom" instruction......
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  5. #95
    Join Date
    Mar 2002
    Location
    California
    Posts
    1,582

    Re: The grand 'goto' poll

    Quote Originally Posted by TheCPUWizard
    Wondering why this type of debate is not seen regarding the elusive "ComeFrom" instruction......
    Ahh, a fellow initiate of the most underappreciated language ever created:
    Intercal

    "Abandon All Sanity, Ye Who Enter Here"

    Jeff

  6. #96
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: The grand 'goto' poll

    Quote Originally Posted by Zeeshan
    When I was student, my C language teacher told us, no matter how good project we made, if we used goto even once, he wouldnt accept our project.
    If I were a teacher/professor I would say exactly the same (actually I say it to anyone asking about goto). I would fail anyone that used goto... Call me hysterical anti-goto dogmatic but that's how I feel about it. Goto is the first thing I would get rid of from C/C++.
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  7. #97
    Join Date
    Sep 2002
    Location
    14° 39'19.65"N / 121° 1'44.34"E
    Posts
    9,815

    Re: The grand 'goto' poll

    Quote Originally Posted by cilu
    If I were a teacher/professor I would say exactly the same (actually I say it to anyone asking about goto). I would fail anyone that used goto... Call me hysterical anti-goto dogmatic but that's how I feel about it. Goto is the first thing I would get rid of from C/C++.
    Actually, I was trying to lift that discussion to another level: My remark (and the previous, longer post) were not directly related to the use of the goto statement itself, but about a category of persons who are stubborn and inflexible enough to make a religion out of something as arcane as the general use of a single language feature. Did you want to say with your post that you belonged to that category?

  8. #98
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: The grand 'goto' poll

    Quote Originally Posted by gstercken
    Actually, I was trying to lift that discussion to another level: My remark (and the previous, longer post) were not directly related to the use of the goto statement itself, but about a category of persons who are stubborn and inflexible enough to make a religion out of something as arcane as the general use of a single language feature. Did you want to say with your post that you belonged to that category?
    When it comes to goto, definitely...

    Do you know that song:
    imagine there's no country
    nothing to kill or dying for
    and no goto
    imagine all the people
    living life in peace
    you may say i'm a dreamer
    but i'm not the only one
    i hope some day you'll join us
    and the world will be at one...
    Last edited by cilu; September 28th, 2004 at 10:55 AM.
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  9. #99
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,835

    Re: The grand 'goto' poll

    As you know, Liverpool is where The Beatles came from.... and a few years ago, Liverpool airport renamed itself to "John Lennon Airport" and adopted the slogan "above us only sky" - a direct quote from his song, Imagine.

    Then somebody started spreading rumours around that their baggage handlers had decided to adopt another line from the same song....

    "imagine no possessions"
    "A problem well stated is a problem half solved.” - Charles F. Kettering

  10. #100
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: The grand 'goto' poll

    Quote Originally Posted by John E
    As you know, Liverpool is where The Beatles came from.... and a few years ago, Liverpool airport renamed itself to "John Lennon Airport" and adopted the slogan "above us only sky" - a direct quote from his song, Imagine.

    Then somebody started spreading rumours around that their baggage handlers had decided to adopt another line from the same song....

    "imagine no possessions"
    Probably I would say "don't goto John Lennon Airport"...
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  11. #101
    Join Date
    Sep 2002
    Location
    Maryland - Fear The Turtle!
    Posts
    7,537

    Re: The grand 'goto' poll

    ... ...
    I felt a great disturbance in the Force, as if millions of voices suddenly cried out in terror "please close this thread".

  12. #102
    Join Date
    Nov 2002
    Location
    Foggy California
    Posts
    1,245

    Re: The grand 'goto' poll

    Quote Originally Posted by jfaust
    Ahh, a fellow initiate of the most underappreciated language ever created:
    Intercal

    "Abandon All Sanity, Ye Who Enter Here"
    And I thought the Whitespace language was bad!
    Kevin Hall

  13. #103
    Join Date
    Mar 2004
    Location
    Central Florida
    Posts
    293

    Re: The grand 'goto' poll

    Quote Originally Posted by TDM
    Just as a side note. I performed a search on my entire VC++.NET directory for goto and it returned 2287 hits.

    TDM
    Microsoft should rarely be used as an example of good coding practice. I haven't used GoTo since I quite programming is QuickBasic 10 years ago.

  14. #104
    Join Date
    Nov 2002
    Location
    Los Angeles, California
    Posts
    3,863

    Re: The grand 'goto' poll

    Heck I just want to be part of a goto thread, I have always admired these things...

    //As a side note.. I have never used goto, but I don't know why, It just seems to
    //have turned out that way. I think I am goig to put a goto into the C++ code I
    //am wrting right now, just because I don't like people telling me what to do, and
    //this goes double if the person is a Professor
    Last edited by souldog; September 28th, 2004 at 05:55 PM.
    Wakeup in the morning and kick the day in the teeth!! Or something like that.

    "i don't want to write leak free code or most efficient code, like others traditional (so called expert) coders do."

  15. #105
    Join Date
    Jan 2004
    Location
    Near Portland, OR
    Posts
    222

    Re: The grand 'goto' poll

    Quite a few languages have "goto" statements and they may or may not be necessary depending on the structure of the language. Every assembly language I ever used had a goto and you needed to use it. There was no way around it. I believe Basic has a necessary goto also (I have very little experience with Basic). I can't remember if Fortran does or not (I haven't even seen Fortran since my college days).

    Goto is a part of C (and C++), but the structure of the language makes it unnecessary except for handling some extreme error conditions. The language has a better way of writing a program.

    There is some dogmatism about goto in C and C++, but there are some practical reasons for it too. Not only is a program listing more readable by a human without gotos, but I don't believe modern optimizing compilers won't optimize code with a lot of gotos very well, which will make the program run slower.

Page 7 of 9 FirstFirst ... 456789 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured