Reply to post: Re: Fun with COBOL

Cloudflare goes retro with COBOL delivery service. Older coders: Who's laughing now? Turns out we're still vital

Michael Wojcik Silver badge

Re: Fun with COBOL

as "GOTO A VIA B" which would execute one statement at B before jumping to A.

Considering COBOL does have PERFORM THROUGH (or THRU), which will happily accept a second paragraph-name that appears before the first paragraph-name, this wouldn't be that much of a stretch.

(PERFORM A THROUGH B says "start at paragraph A, and if you ever reach the end of paragraph B, come back here". Usually COBOL programmers will perform a contiguous range of paragraphs in the order they appear in the source, but you're not required to. There can be any arbitrary morass of GOTOs among those paragraphs and any others you have in the program. And some implementations have stacked performs, but others use flat performs, and that quickly becomes quite confusing.)

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon