|
While obvious with regard to DO groups
that are standalone, most Do-groups are instead embedded in an IF\ELSE.
Like a GOTO LabelName can easily cause problems when code is changed
or copied, so too could a LEAVE in an IF, given an ELSE was added; i.e.
previously having processing continued in the implied ELSE, after adding
an ELSE the processing LEAVE likely would have been defined to continue
after the DO groups of both the IF and the ELSE.? The question mark,
because arguably [and documented as such, that] they are two distinct
non-nested Do-groups; one as part of the THEN of the IF statement and
the other as part of the ELSE which is its own separate statement. Thus
there is a possibly valid argument that the LEAVE CMDLBL(*CURRENT) would
properly go to the ELSE. If the CMDLBL() specification could extend to
a LABEL for an IF versus a LABEL for a DO statement, and all of the
DO\ENDDO under that IF were considered as one Do-group, then that could
make a LEAVE in a non-looping Do-group seem somewhat reasonable [to me].
Regards, Chuck
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.