Replace obsolete Fortran "pause" statement

The obsolete Fortran 66 statement pause had various behaviors depending on the operating system and compiler. Fortran pause was used for three different purposes in the Fortran 66 / 77 era:

  • (most common use) program waits forever, until the user pressed the Enter key, ignoring typed input.
  • wait for user to type text on tty stdin, assigning the typed text to a variable.
  • (very old programs) drop to a system shell, allowing any shell command to be used

These can be replaced with unambiguous modern Fortran code.

Wait till Enter: the program waits for the Enter key, ignoring any console input.

use, intrinsic:: iso_fortran_env, only: input_unit

print *, 'Waiting for Enter.'
read(input_unit, *)