Source: https://personalpages.manchester.ac.uk/staff/david.d.apsley/lectures/fortran/fortranA.pdf