Years ago, I learned my first programming language (FORTRAN) from an excellent book by Daniel McCracken who was justly famous for his excellent programming books. He was also known, (but not quite as well) for a mid-life crisis which involved completing a degree from a seminary, but never getting ordained, if my memory serves me. His popularity peaked around the time of the big push for structured programming, and I attended a discussion by him of structured programming. He was positive about it, but with a few caveats. I do remember his saying (approximately):"Pity the poor COBOL programmer working on the error recovery routines for Indexed-Sequential file handling, who finds himself 5 levels deep in nested PERFORMS, and is heard to shout as he sinks beneath the waves: 'Just one GO TO!'.". Looking at the situation where there are multiple conditions under which a procedure/block should terminate, if one is forced to follow the stricture of a single exit from a procedure, one is forced to choose between a convoluted set of nested if's or using goto's to the single exit point. The use of goto's could be considerably easier to follow, especially in the case of the original non-structured COBOL where PERFORM's would be necessary.

Dale Miller

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to