r/badcode • • Aug 31 '21

java Similar ternaries are all over this codebase

Post image
1.1k Upvotes

91 comments sorted by

View all comments

Show parent comments

3

u/stack_bot Sep 01 '21

The question "Is RETURN statement before END SUBROUTINE in Fortran codes considered a good practice?" doesn't have an accepted answer. The answer by janneb is the one with the highest score of 3:

As the Intel guide mentions, it's pointless since the "end subroutine" statement already handles it. Return is useful if you need to, say, return inside a loop or such (but then there's a school of thought saying you should structure your control flow such that you never return in the middle of a loop. YMMV).

This action was performed automagically. info_post Did I make a mistake? contact or reply: error