On 4/23/2012 10:48 AM, Clark Morris wrote:
If IBM had implemented the EXIT enhancements in the 2002 standard we
would have available

EXIT PERFORM (for inline PERFORMs which are like DO loops)
EXIT PERFORM CYCLE which allows iteration without having to do
                    unnatural things in the code
EXIT PARAGRAPH
EXIT SECTION.

I know I could have used them.  Unfortunately many companies seem
stuck on coding standards last updated for COBOL VS.


Though not specific to COBOL, there are two excellent studies/papers worth reading on this subject:

Wolfgang Gellerich, Markus Kosiol and Erhard Plödereder, "Where does GOTO Go to?", Reliable Software Technologies — Ada-Europe '96, Montreux, Switzerland, June 10–14, 1996 Proceedings, Lecture Notes in Computer Science, Volume 1088/1996, pp. 385-395

This paper documents the disastrous effects GOTO can have on compiler optimization for RISC, superscalar, out-of-order execution and other non-obvious, but important execution efficiencies of which optimizers are increasingly aware. It finds that GOTO is most often used when the programmer is attempting to write more efficient code yet tends to have exactly the opposite effect.

W.Gellerich and E.Plödereder, "The Evolution of GOTO Usage and Its Effects on Software Quality," Informatik'99,
K.Beiersdörfer, G.Engels, and W.Schäfer, Eds., Springer-Verlag, Berlin, 1999

This paper presents the results of a study in which the frequency and typical applications of GOTO in over 400 MB of C and Ada source code were analyzed. The analysis demonstrated that the availability of sufficiently powerful control structures in a language significantly reduces the frequency of GOTO. Relating these results to error rates reported for large software projects indicates that programs written with lower GOTO density are more reliable.

Though tangential to the core discussion, the following article references the above studies and might be of interest to those involved with this platform:

W.Gellerich, T.Hendel, R. Land, H.Lehmann, M. Mueller, P. H.Oden, H.Penner, "The GNU 64-bit PL8 compiler: Toward an open standard environment for firmware development", IBM Journal of Research & Development, 48, No. 3/4, May/July 2004, pp. 3-4.

This paper compares GOTO density metrics for Fortran, C, Ada, and PL8 (the language in which System z firmware is written). I added HLASM to the chart for a SHARE presentation I gave back in 2008 in San Jose (link below).

_______________________________________________________________
| | Fortran | C | Ada | PL8 | HLASM |
|Files without GOTO | none | 81.5% | 99.4% | 98.5% | none |
|Lines/GOTO | ~10 | 386 |13614 | 1310 | <8 |
'-------------------------------------------------------------'

http://proceedings.share.org/client_files/SHARE_in_San_Jose/S8133EJ131525.pdf

--
Edward E Jaffe
Phoenix Software International, Inc
831 Parkview Drive North
El Segundo, CA 90245
310-338-0400 x318
edja...@phoenixsoftware.com
http://www.phoenixsoftware.com/

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

Reply via email to