Create a new group of functional names
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | input_names(:) |
List of spellings/names of the functional |
Functional with possibly different spellings
function new_funcgroup(input_names) result(group) !> List of spellings/names of the functional character(len=*), intent(in) :: input_names(:) !> Functional with possibly different spellings type(functional_group) :: group integer :: n, i, max_len n = size(input_names) ! Determine the length of the longest name max_len = 0 do i = 1, n max_len = max(max_len, len_trim(input_names(i))) end do ! Allocate based on the longest name's length allocate(character(len=max_len) :: group%names(n)) do i = 1, n group%names(i) = trim(input_names(i)) end do end function new_funcgroup