Click here to Skip to main content
16,012,061 members

Survey Results

The goto statement.   [Edit]

Survey period: 8 Jan 2001 to 14 Jan 2001

We want to finally put to rest the question of whether the goto statement is a Good Thing or a Bad Thing.

OptionVotes% 
It's a great thing. Can't live without it.111.60
It's handy if used correctly16724.31
It's just a piece of syntax - niether good nor bad.8612.52
I don't like it, but can see why it may be useful sometimes.25136.54
It's a Very Bad Thing17225.04



 
GeneralRe: How do you use Goto ? Pin
7-Jan-01 23:43
suss7-Jan-01 23:43 
GeneralRe: How do you use Goto ? Pin
8-Jan-01 8:59
suss8-Jan-01 8:59 
GeneralRe: How do you use Goto ? Pin
8-Jan-01 23:10
suss8-Jan-01 23:10 
GeneralRe: How do you use Goto ? Pin
9-Jan-01 16:03
suss9-Jan-01 16:03 
GeneralRe: How do you use Goto ? Pin
Colin J Davies8-Jan-01 6:11
Colin J Davies8-Jan-01 6:11 
GeneralRe: How do you use Goto ? Pin
19-Jan-01 5:14
suss19-Jan-01 5:14 
GeneralWho needs goto Pin
AlexMarbus7-Jan-01 21:12
AlexMarbus7-Jan-01 21:12 
GeneralRe: Who needs goto Pin
Gavin Greig8-Jan-01 3:37
Gavin Greig8-Jan-01 3:37 
I've never had to use goto in C++ or any other structured language, but back in the bad old days (1992-3) when I was a MUMPS developer, "goto" and other bizarre things like postconditionals on statements were used to construct some useful things that didn't exist within the language.

If I remember correctly, you could make a while loop out of an argumentless FOR loop, and a postconditional and you could make a do...while by doing something wonderfully baroque like this:

IF (condition) THEN FOR DO QUIT:(NOT condition)
.(loop body goes here)

You would use a GOTO in circumstances where you might use a "break" in C++, and in older code it was used to implement subroutines (functionality was later added to the language to make this unnecessary).


For what it's worth, IMHO MUMPS is the most horrible programming language in the world - my example is not true MUMPS because I've tried to improve its readability slightly in order to make the point. I'm not aware of any other languages in which you can write an infinite loop in three characters, two of which are invisible (F, space, space). Eek! | :eek:

Gavin.
GeneralRe: Who needs goto Pin
AlexMarbus8-Jan-01 5:19
AlexMarbus8-Jan-01 5:19 
GeneralRe: Who needs goto Pin
Gavin Greig8-Jan-01 22:37
Gavin Greig8-Jan-01 22:37 
GeneralRe: Who needs goto Pin
David Wulff8-Jan-01 5:42
David Wulff8-Jan-01 5:42 
GeneralRe: Who needs goto Pin
Christian Graus8-Jan-01 12:03
protectorChristian Graus8-Jan-01 12:03 
GeneralRe: Who needs goto Pin
David Wulff8-Jan-01 12:16
David Wulff8-Jan-01 12:16 
GeneralRe: Who needs goto Pin
John Fisher9-Jan-01 5:08
John Fisher9-Jan-01 5:08 
GeneralRe: Who needs goto Pin
David Wulff9-Jan-01 9:43
David Wulff9-Jan-01 9:43 
GeneralRe: Who needs goto Pin
Christian Graus9-Jan-01 13:20
protectorChristian Graus9-Jan-01 13:20 
GeneralRe: Who needs goto Pin
8-Jan-01 11:53
suss8-Jan-01 11:53 
GeneralRe: Who needs goto Pin
9-Jan-01 16:09
suss9-Jan-01 16:09 
GeneralRe: Who needs goto Pin
coder847213-Jan-01 12:34
coder847213-Jan-01 12:34 
GeneralRe: Who needs goto Pin
MrLonely13-Jan-01 12:47
MrLonely13-Jan-01 12:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.