(DanRRight, July 13, 2015) So, no, thanks. Implicit none is dead wrong approach with large codes if compiler has /undef. Yes, undef does not catch some rare errors. But it catches 1000 times more then implicit none. Dan is entitled to use whatever methods he prefers, but the justifications that he listed are incorrect.
First of all, IMPLICIT NONE and /undef are not mutually exclusive. We can use one or both or none, as appropriate to the situation at hand. IMPLICIT NONE is just one ingredient of static code checking, whereas /undef is just one ingredient of dynamic code checking.
There is more to debugging than just catching misspelled variable names, whether at compile time or at run time. A program may contain, in addition to misspelled variable names, incorrect argument lists passed to subroutines and functions, etc. With such errors present, even with /undef causing the program to issue an error and abort, you will still have to diagnose why the variable became undefined.
[u:78d621f218]Dynamic error checking, in general, and /undef, in particular, only covers those parts of the code that got executed in a particular run[/u:78d621f218]. Consider this code fragment
if (iter > itmax) then
ierr = -1
call vperr (iprint, ierr, 1)
go to 95
endif
Most of the time, the iterative algorithm that this code implements converges without *iter *exceeding itmax. If all the test runs worked this way, the entire body of subroutine vperr would never have been tested, whether or not the programmer used /undef. A few years later, a customer tries this code on a tougher problem, vperr gets executed, and lots of mysterious errors surface. Who gets the pleasure of finding the bugs in that case? Who gets the blame?
Dan's refusal to use IMPLICIT NONE, even occasionally, reminded me of the reason stated by some automobile passengers do not wear seat belts -- that wearing them might hinder a quick escape after a crash. A couple of months ago, Nobel Laureate John Nash and his wife Alice died in a taxi-cab crash on their way home in New Jersey (USA) from the airport. The Nashes were returning from a trip to Norway, where John Nash had just been honored with the Abel prize in mathematics. Neither was wearing a seat belt, and both were ejected from the taxi after the crash.