Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It 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.


I was responding to "completely absent in all modern languages". Alternate return has been in the standard since '77, and Fortran 2018 seems modern enough.


You 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.


In 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.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: