3 ms·
Is the PL/I alternate return fundamentally different from Fortran's (or FORTRAN's in those days)?
by gnufx 5y ago
Is the PL/I alternate return fundamentally different from Fortran's (or FORTRAN's in those days)?
- adrian_b 5y agoIt was the same as in many FORTRAN IV dialects and also in ALGOL and in many other early languages, but in FORTRAN that was not a standard language feature, even if many compilers implemented it as a language extension.
- gnufx 5y agoI was responding to "completely absent in all modern languages". Alternate return has been in the standard since '77, and Fortran 2018 seems modern enough.
- adrian_b 5y agoYou are right that alternate return labels have been included in more recent FORTRAN standards. Nevertheless, this feature is much less useful in FORTRAN than in laguages like PL/I, because the FORTRAN labels are restricted to numbers. Unless you use a preprocessor, you cannot give descriptive names to the error handlers, so the equivalent FORTRAN code looks much uglier than in PL/I.
- gnufx 5y agoIn which FORTRAN IV dialects was it the same as in PL/I? I should have said that alternate return is obsolescent in recent Fortran, and I don't remember ever feeling the need to use it, at least for error-handling.