-
Couldn't load subscription status.
- Fork 19
Closed
Labels
Description
Initial recent paper: https://j3-fortran.org/doc/year/18/18-274.txt (there is a long history of trying to get something like this standardized).
Motivation
Citing from the paper:
People have wanted to write things like
IF (I<N .AND. A(I)==0) ...for decades. So far, we have fobbed them off and they have to write
IF (I<N) THEN
IF (A(I)) ...
END IFwhich is not just verbose but less convenient when wishing to test a series
of conditions.
Similarly, writing
IF (PRESENT(D)) THEN
CALL SUB(A,B,C,D)
ELSE IF (X<1) THEN
CALL SUB(A,B,C,EPSILON(X))
ELSE
CALL SUB(A,B,C,SPACING(X))
END IFis verbose but usable when only one argument is conditional, but rapidly
degenerates when there are several arguments requiring similar handling.