Since Fortran subroutines require everything to be declared, we can't easily write a custom print subroutine with the same power and flexibility as the print
statement.
Throughout the code we have print statements each with multiple if statements to handle the parallel processing and the chosen debug output mode. Many different types of variables with different formats are printed, including matrices with their respective do-loops.
We simply want to write a print statement as normal in addition to one integer which represents its debug mode and then find a way to include all of the appropriate if statements for each of these. Trying to achieve this with a subroutine is achievable with a generic interface but requires huge amounts of interface cases covering all of the possible input arrangements. Whereas, this is much more straightforward with preprocessing replacement. Am I missing something majorly useful?
print
is NOT an intrinsic procedure. It is a Fortran language statement and that is VERY different and obeys completely different rules. – Vladimir F