Click here to Skip to main content
15,913,296 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: goto statement Pin
Stefan_Lang12-Nov-13 1:36
Stefan_Lang12-Nov-13 1:36 
GeneralRe: goto statement Pin
vl212-Nov-13 1:43
vl212-Nov-13 1:43 
GeneralRe: goto statement Pin
Bill_Hallahan12-Nov-13 13:46
Bill_Hallahan12-Nov-13 13:46 
GeneralRe: goto statement Pin
Fran Porretto11-Nov-13 0:54
Fran Porretto11-Nov-13 0:54 
GeneralRe: goto statement Pin
Stefan_Lang11-Nov-13 1:48
Stefan_Lang11-Nov-13 1:48 
GeneralRe: goto statement Pin
Fran Porretto11-Nov-13 2:06
Fran Porretto11-Nov-13 2:06 
Generalgoto vs. exception Pin
Member 1039410411-Nov-13 4:15
Member 1039410411-Nov-13 4:15 
GeneralRe: goto statement Pin
gggustafson11-Nov-13 6:27
mvagggustafson11-Nov-13 6:27 
In 1974, my manager asked me to evaluate the new, highly touted discipline called "structured programming."

I was skeptical. At that time, I was programming in COBOL. In those days, COBOL was somewhat deficient in the amount of control structures provided. I had not yet read Bohm and Jacopini so I had no idea that the control structures of COBOL were more than adequate for the task. I suggested that I wait to perform a structured programming experiment until a new project came along.

In July, I was assigned a new project. The Chief of Naval Operations (CNO) Budget Office was in need of a text editor that could edit the descriptive portions of records in an indexed sequential file. The program would be developed and executed on a Unisys 1106 main frame computer. Unfortunately, the Budget Office also knew about the University of Maryland Text Editor (med) which, for all intents and purposes, replaced the Unisys provided editor (ed). The Budget Office wanted the interface to be "just like med" a seemingly impossible job for the short project time (three months). Fortunately, I found that med contained an API that would allow me to use the editor against the textual fields of the indexed sequential file.

So it began. For this project I could not use a GOTO statement, a standard tool of the COBOL programmer of those days. I struggled with the problem. It wasn't that the solution was difficult; the solution was difficult without using GOTOs. Finally, in September, I finished. When queried by my manager, I told him that the programming effort took longer than it would have had I not used the structured programming paradigm. We agreed that, even though some rather impressive academians had suggested that structured programming was the way to go, we would shelve further use of the method. I placed the code listing in one of the drawers of my desk and returned to programming in my normal unstructured way.

Then, in December, I received a call from the CNO production office. It appeared that a program that I had written had blown up. The production office provided the symptoms and the name of the program. I looked in my drawer and found the flawed program. When I opened the listing, I realized that this was the program that I had struggled with. As I reviewed the code, in light of the comments provided by the production office, the bug just seemed to jump from the page. It was such a simple error. But had I written the code in my normal manner, I would never have found the problem so quickly. After about fifteen minutes, during which I recoded, recompiled, and rebuilt the software, I called the production office and advised them that the software was ready for reinstallation. Neither they nor I could believe how quickly the bug was found and fixed.

Since that December day in 1974, I haven't used a GOTO statement in my work (excluding assembler, of course).
Gus Gustafson

GeneralRe: goto statement Pin
vl211-Nov-13 7:24
vl211-Nov-13 7:24 
GeneralRe: goto statement Pin
werinus11-Nov-13 20:46
werinus11-Nov-13 20:46 
GeneralRe: goto statement Pin
vl212-Nov-13 0:37
vl212-Nov-13 0:37 
GeneralRe: goto statement Pin
Stefan_Lang12-Nov-13 1:37
Stefan_Lang12-Nov-13 1:37 
GeneralRe: goto statement Pin
vl212-Nov-13 1:41
vl212-Nov-13 1:41 
GeneralRe: goto statement Pin
Bill_Hallahan12-Nov-13 13:48
Bill_Hallahan12-Nov-13 13:48 
GeneralRe: goto statement Pin
Al Chak13-Nov-13 4:14
Al Chak13-Nov-13 4:14 
GeneralRe: goto statement Pin
Al Chak13-Nov-13 4:11
Al Chak13-Nov-13 4:11 
GeneralRe: goto statement Pin
Member 460889816-Nov-13 1:49
Member 460889816-Nov-13 1:49 
GeneralRe: goto statement Pin
Tarek Elqusi16-Nov-13 19:37
professionalTarek Elqusi16-Nov-13 19:37 
GeneralMy Saturday PinPopular
Michael Martin9-Nov-13 16:47
professionalMichael Martin9-Nov-13 16:47 
GeneralRe: My Saturday Pin
Septimus Hedgehog9-Nov-13 22:06
Septimus Hedgehog9-Nov-13 22:06 
GeneralRe: My Saturday Pin
OriginalGriff9-Nov-13 23:59
mveOriginalGriff9-Nov-13 23:59 
GeneralRe: My Saturday Pin
CPallini10-Nov-13 6:20
mveCPallini10-Nov-13 6:20 
GeneralRe: My Saturday Pin
_Maxxx_10-Nov-13 14:39
professional_Maxxx_10-Nov-13 14:39 
QuestionWool lined Coat Pin
Marco Bertschi9-Nov-13 8:01
protectorMarco Bertschi9-Nov-13 8:01 
AnswerRe: Wool lined Coat Pin
Ravi Bhavnani9-Nov-13 9:48
professionalRavi Bhavnani9-Nov-13 9:48 

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.