As of now I am defining a new type and having a procedure added to it pointing to a function.
type :: species
character(len=50) :: species_name ! Species Name
integer :: species_number ! Species Number
procedure(sub_crosssection), pointer, pass(self) :: calculate_cross_section ! Collision Reaction
end type
What I want is an array of function pointers, I tried
procedure(sub_crosssection), pointer, pass(self) :: calculate_cross_section_ar(10) ! Collision Reaction
and
procedure(sub_crosssection), allocatable, pointer, pass(self) :: calculate_cross_section_ar(:) ! Collision Reaction
However I am not able to define any of this. I wanted to know even something like this is even possible in Fortran?
TLDR: I want an array of function pointers in type data structure. Is this possible?