Modernising old libraries - error handling

I would never use a library that returns NaNs.

Considering the current Fortran standard with rudimentary to no support for this aspect, KISS will be preferable for FOSS libraries in Fortran:

  1. FUNCTION subprograms: employ ERROR STOP for the exceptions that, hopefully, are as such!
  2. SUBROUTINEs: include STAT and ERRMSG arguments and follow intrinsic procedures: a) STAT is INTENT(OUT) and zero value means SUCCESS and b) ERRMSG is INTENT(INOUT)