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.