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 *
|