Simple way to implement a group of queues in Fortran?

后端 未结 3 883
旧巷少年郎
旧巷少年郎 2021-01-16 18:57

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

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-16 19:43

    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.)

提交回复
热议问题