Suppose that I need to implement at least 5 queues in one procedure, each of it from a different defined type. How can achive this in a simple and short way?.
Anot
If you really want templates, there is Pyf95++. It brings templating and an STL for Fortran using a preprocessor. (for download here)
A generic linked-list that uses transfer()
can be found in FLIBS.
(Otherwise with a bleeding edge compiler you can use unlimited polymorphism as suggested by Richard Lozes.)