I am programming in Fortran 90. I am looking for a way to template my functions in fortran, similar to that of C++ templating. For example, in C++ one can write a function that takes in a variable that can be of some generic type rather than having to write individual functions for each individual type.
The only similar way that I've found to "somewhat" do this in Fortran 90 is through 'interface', but this requires each individual function for each type to be coded and then the individual functions are wrapped into some 'generic' interface. This is not very elegant as all my functions are the same, just that it takes in different types of arguments. Does anyone know of another way to do this in Fortran 90?