|
Hi all - I definitely think GOTO needs to be retained, even within free-format coding. I've been programming in various RPG versions for over 20 years, starting on the S/32. When structured programming opcodes became available on the S/36, I started using them. I do all new development in RPG IV, using file I/O BIFs rather than indicators. I use procedures. I use activation groups. So I'm not a old f*rt programmer who refuses to use anything new. But I still use GOTOs where appropriate. As I see it, the problem is not GOTOs, the problem is too many TAGs. Twenty GOTOs all going to the same TAG is not a problem. Twenty GOTOs going to twenty different TAGs *is* a problem. GOTO/TAG is a far better method to "short-circuit" out of a section of code than having an ugly tangle of embedded "structured" opcodes. Or to put it another way, TAGs should only be at the top or the bottom of logical sections of codes, and the GOTOs only within the same logical section. Ken Southern Wine and Spirits of Nevada, Inc. Opinions expressed are my own and do not necessarily represent the views of my employer or anyone in their right mind. +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.