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?.
Another way to see the question is the way that came to me: after a lot of time of defining my own structures in fortran, I had to make a program in C++, and then I saw how easy is the use of templates… now, I want the same in my mother tongue….
seems that the knowledge is not always confortable
Thanks a lot!
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.)