I just thought to check that EXIT PARAGRAPH and EXIT SECTION "work" in DECLARATIVES, and came across this bunch of nonsen... err, came across this documentation:
"EXIT SECTION The EXIT SECTION statement can be specified only in a section. When an EXIT SECTION statement is executed, control is passed to an unnamed empty paragraph that immediately follows the last paragraph of the current section. This return mechanism supersedes any other return mechanisms that are associated with language elements, such as PERFORM, SORT, and USE for that section." So, yes. it works in DECLARATIVES (the reference to USE) but.... What does "this return mechanism supersedes any other return mechanisms that are associated with language elements, such as PERFORM, SORT, and USE for that section" actually mean? After all, EXIT SECTION isn't a "return mechanism", it is a "GO TO the return-mechanism code mechanism", isn't it? What are "return mechanisms", as in plural, with respect to PERFORM, SORT and USE? As far as I know there is only one return mechanism for each of these language elements, which can basically be stated as "when under the control the language element, and the last statement within scope of the element is reached, branch to the handily-stored return-address". SORT happens to have five scopes, four relevant here, but the return mechanism of all those scopes is the same. What is the documentation (V6.1 Language Reference) of EXIT SECTION (and EXIT PARAGRAPH) trying to say that I am missing? Or is it just... odd? ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
