Structured Programming with go to Statements, Donald E.  Knuth, Computing 
Surveys, Volume 6, No.  4, Deecember 1974

Reprinted in Classics of Software Engineering.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Bob 
Bridges [robhbrid...@gmail.com]
Sent: Wednesday, March 29, 2023 11:28 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Stop the ragging on COBOL please [was: RE: ASM call by value]

I'm going to disagree only in a tiny and technical way:  ITERATE forces more 
discipline, but what that means is not that GOTO is less disciplined but that 
GOTO ~allows~ less discipline.  Back in my COBOL days I maintained that not all 
GOTOs are evil; these three are just fine:

  GOTO TOP-OF-LOOP (REXX's ITERATE)
  GOTO EXIT-PARAGRAPH
  GOTO EXIT-PROGRAM

Many programming languages now synthesize these in various structured 
statements without actually using the word "goto".  But if you don't have them 
(as with ITERATE in VBA) a GoTo can do the same without sacrificing clarity.

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* They keep talking about drafting a Constitution for Iraq.  Why don't we just 
give them ours?  It was written by a lot of really smart guys, it's worked for 
over 200 years and we're not using it any more.  -from pre-2005 debate */

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Paul Gilmartin
Sent: Wednesday, March 29, 2023 11:19

Ir's a more disciplined alternative to GOTO.

--- On Wed, 29 Mar 2023 09:38:50 -0400, Bob Bridges wrote:
>I love the iterate statement for much the same reason:

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to