FORTRAN has this distinction since the beginning.
FORTRAN has this distinction since the beginning.
(Modern Fortran does have a pure keyword meaning "no side effects", but that wasn't there "since the beginning".)
[EDITED to add:] I checked in the Fortran 77 standard. The difference between a FUNCTION and a SUBROUTINE is just that the former returns a value and the latter doesn't; in the code for a FUNCTION you are absolutely allowed to do I/O, modify global variables, etc. Functions (and subroutines) can change the values of the variables passed to them. There are also things called "statement functions" which have to have single-line definitions along the lines of "square(x) = x*x"; these don't have to be pure either because the defining expression may call functions that have side-effects.
Despite working in Fortran every day, I never knew about statement functions before. Thanks.