Is creating nested subroutines/functions considered good practice in Fortran?

By default, the internal subprogram indeed “imports” all the objects from the containing scope.

What IMPORT, ALL provides is documentation of that situation - the readers of your program (who may be you yourself in a future avatar such as some period of time later where the state of memory is different!) may find that clearer to understand / beneficial .

1 Like