HP3000-L Archives

March 2004, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Gates, Scott" <[log in to unmask]>
Reply To:
Gates, Scott
Date:
Fri, 12 Mar 2004 15:32:38 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (66 lines)
I had a two profs in college when I took COBOL.  One had worked for a while
in the "real world".  The other, hadn't been off campus since he got his
graduated high school (ok, an exaggeration, but you get the point.)

The Real World programmer was JUST FINE with GOTO so long as jumps were
short, everything was readable, and clearly documented.

The Academnut wouldn't permit a GOTO under any circumstances.  Those of us
who knew we'd one day have to get 'real jobs' made rather disparaging jokes
about the Prof dying while doing PERFORM OPEN-DOOR UNTIL EXIT FOUND loop to
escape if there was a fire  when a GOTO EXIT would save the rest of us.

OK, That's not exactly COBOL, but it made the joke quicker.

-----Original Message-----
From: Dave Powell [mailto:[log in to unmask]]
Sent: Friday, March 12, 2004 3:05 PM
To: [log in to unmask]
Subject: Re: [HP3000-L] GO TO -- scary code...


When I started here, the 'standard' was (mostly) free-form mix of goto,
perform thru, etc.  Some of it is still running.  My 1st full-time
programming job was largely to debug this stuff after the orig authors left.
Learned a LOT ;).

But the worst of the bunch was the guy who tried to do structured
programming and didn't use goto or perform-thru.  ALL of this stuff was
re-written from scratch long ago, because we couldn't follow it, and we got
tired of the endless endless-loops.

Most maintainable was the guy who performed only sections, and used go-to
only within a section.  Not what the textbooks say, but a model of clarity
compared to the others.  So that has been the 'new' standard for over 20
years.

----- Original Message -----
From: "John Clogg" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Friday, March 12, 2004 10:39
Subject: Re: [HP3000-L] GO TO -- scary statistics...


Tracy Pierce wrote (among other things):
>...you can't make spaghetti code without goto.

Oh yes you can!  I have seen horribly confusing code that didn't (overtly)
use GOTOs.  I say "overtly" because as I and others have pointed out, it's
possible to use a PERFORM command to accomplish a GOTO.  As has also been
pointed out, the PERFORM...THRU is also an excellent tool for creating
spaghetti code.  If GOTO-less code is written WELL, it is indeed free of
spaghetti and other forms of confusion, but the idea that removal of GOTOs
alone is sufficient to accomplish that is a notion with which I can't agree.

Regards,
John Clogg

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2