Sorin Sarateanu
Systems Engineer
I have noticed the below code in one of my Fortran programs:
IF (C.LT.D) THEN
NFAIL(9) = NFAIL(9) + 1
GOTO 152
ENDI F
As it can be seen above the "IF" statement contains a syntax error "ENDI F" instead of "END IF".
To my surprise, when I compile the code, the compiler successfully passes the wrong code and build the program.
How is this possible?
IF (C.LT.D) THEN
NFAIL(9) = NFAIL(9) + 1
GOTO 152
ENDI F
As it can be seen above the "IF" statement contains a syntax error "ENDI F" instead of "END IF".
To my surprise, when I compile the code, the compiler successfully passes the wrong code and build the program.
How is this possible?