Sad, but true.
I've seen (and been amazed by) production programs that do this.
I just tested it, and 6.1 still compiles and happily executes branching
from subroutine to main logic.
To my further amazement / dismay, the 6.1 ILE RPG Language Reference
says, "A GOTO within a subroutine in a subprocedure can be issued to a
TAG within the same subroutine, or within the body of the subprocedure."
I would have thought subprocedures would have been a good place to stop
supporting this god-awful junk.
Like a former team lead once said, "If it was hard to develop, it should
be hard to maintain."
--MK

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Crispin Bates
Sent: Thursday, June 03, 2010 2:26 PM
To: RPG programming on the IBM i / System i
Subject: Re: Something Wrong with the following Code ?

Dennis, my copy of the RPG/400 Reference from 1990 (oldest I can lay my
hands on) contains the same verbiage as it does today...specifically...

A GOTO operation can be used to specify a branch:
...
...
...
.From a subroutine to a detail calculation line or to a total
calculation
line

So, it has been that way for long enough for it to not have ever
changed...

Crispin.

----- Original Message -----
From: "Dennis Lovelady" <iseries@xxxxxxxxxxxx>
To: "'RPG programming on the IBM i / System i'" <rpg400-l@xxxxxxxxxxxx>
Sent: Thursday, June 03, 2010 2:04 PM
Subject: RE: Something Wrong with the following Code ?


That is the way I understood it for years! Something must have
changed
recently. (By "recently," I mean within the last twenty or so.) The
code
compiles (to my similar surprise) on V5R3.

I'd like to see Barbara's take on this.




This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.