What is a pure procedure?
A Fortran procedure is pure when it doesn’t cause any observable side effects, such as I/O or modifying the value of a variable declared outside of the procedure. To define a procedure as pure, simply add the pure attribute to its function or subroutine statement, as shown in the following listing. Listing 3.17 Defining a pure, side effect-free function ❶ The pure attribute asserts that the function […]