Closing if-loops by "endif" vs. "end if"

I personally write in the most verbose possible style in any programming language for clarity and readibility. I think it is possible to avoid the labels if needed/wanted. MATLAB is an example, as fortran4r mentioned. But I get your point (which appears in line with Certik’s concerns). The end word is a reserved keyword in MATLAB and cannot be used as a variable name. There is no reserved keyword in Fortran, which is great, but it could create ambiguities, although I doubt if it really does. It certainly makes parsing more difficult for the compilers.

3 Likes