Template in Fortran?
问题 I have a module that defines three types and and some operations on them. In a separate module, I want to define an algorithm that operates on either one of these types using the operations defined in the module. The algorithm is the same, regardless of the type. I can overload it, but I was wondering if I can save a lot of typing by defining some sort of template algorithm. What I have in mind is something like class templates in C++. Thanks 回答1: Fortran does not have templates, but you can