|
>Of course, if you haven't seen COBOL's ALTER GOTO, you don't know what you are >missing. The ALTER GOTO branches to different locations based on the value >of a >variable. The more obscure the variable, the higher your Obfuscation Factor. > >Of course, COBOL is a much superior language to RPG (<vbg>). >Ducking before the incoming arrive, >Bob Larkin Then there was the ALTER verb on the old IBM/1130: ALTER paragraph-name-1 TO PROCEED TO paragraph-name-2 ... PARAGRAPH-NAME-1. GOTO PARAGRAPH-NAME-7. PARAGRAPH-NAME-4. ... PARAGRAPH-NAME-2. ... PARAGRAPH-NAME-7. ... It was self-modifying code. The target of the ALTER statement was a paragraph that contained a single statement: the GOTO. Paragraph-name-2 was any other paragraph name in the program. No matter what the compile listing looked like, the code could change itself to branch all over the place! Quick, efficient (I think it translated into a direct branch in the executable code), and a bear to debug! I only used it in one program (just to prove I could do it). --Paul E Musselman PaulMmn@ix.netcom.com +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To unsubscribe from this list send email to MIDRANGE-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-2025 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.