Thread: goto

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,263
    you disreguard many factors... firstly though the example is meant to be in C, it is quite valid in C++, and is really not even a language specific idea honestly... the example could very well be translated into many languages... the topic is not the language nor language specific solutions... exception handling is not available in C in any easy or simple means though it is the optimal solution in C++ if you disreguard the overhead associated with its use...
    the idea is meant to be clean with minimal overhead and minimal complexity to the reading or function of the code(and in C)... goto overall is the simplest cleanest easiest and quite probably the fastest solution to the problem hence it is an "argument" for its use as opposed to the function version, or the flag version... or even exception handling...
    in essence this is an argument for the use of goto... which is a multi-language tool.

    i posted it because im curious to know if i missed something... or is this infact the best solution... and it doesnt belong in the C forum, because its about goto and programming in general... not the c language
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >comments... suggestions? thoughts?
    That's one of the accepted uses of goto.
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. temperature sensors
    By danko in forum C Programming
    Replies: 22
    Last Post: 07-10-2007, 07:26 PM
  2. goto command
    By jhwebster1 in forum C Programming
    Replies: 3
    Last Post: 02-21-2006, 12:32 PM
  3. Does goto have a glitch or...?
    By Blackroot in forum C++ Programming
    Replies: 9
    Last Post: 02-18-2006, 10:40 AM
  4. helpppp
    By The Brain in forum C Programming
    Replies: 1
    Last Post: 07-27-2005, 07:05 PM
  5. Need some help with a basic tic tac toe game
    By darkshadow in forum C Programming
    Replies: 1
    Last Post: 05-12-2002, 04:21 PM